SlideShare a Scribd company logo
Logging For Fun and Profit

                                    Jane Prusakova

               Jane.Prusakova@ImprovingEnter
                           prises.com
               http://softwareandotherthings.blog
                            spot.com
                                    Improving Enterprises
                                      Houston TechFest
                                         09/08/2012
©2010 Improving Enterprises, Inc.
Why
        How-to
        Using the results


©2010 Improving Enterprises, Inc.
Why logging?
Enquiring minds want to know!
 Avoid programming-by-coincidence
 Trace what the users do
 See effects of
              Integration
              Multithreading
              High load

©2010 Improving Enterprises, Inc.
When to use logging?
      Greenfield development
      Brownfield development
              what came before
              the effect of changes
      Maintenance and troubleshooting
              trace bugs
      Bonus
              Evolve apps based on users behavior


©2010 Improving Enterprises, Inc.
Logging vs Debugging
       Set up once, always ready to use
       Minimum disruption to the flow
       Works locally and in the cloud
       Faster data collection
       Collected data is persisted



©2010 Improving Enterprises, Inc.
How-to
        Using the results


©2010 Improving Enterprises, Inc.
Yes, I want to setup logging!

      Pick a framework

      Proper configuration

      Consider ways to parse logs

      Logging will change with the application




©2010 Improving Enterprises, Inc.
Frameworks
                Log4net                      Nlog
                    Apache                    BSD

              Logs arrays                Integrates with
                                            MSMQ
     Configuration, log levels and categories,
       rotate log files, thread-safe logging.

     Support: online documentation, tutorials,
                  online forums.

©2010 Improving Enterprises, Inc.
Planning and Strategy
      Enough and but not too much
      Preserve
              correctness
              readability of the code
              performance




©2010 Improving Enterprises, Inc.
Planning and Strategy (contd.)

             Database                     Files
          Easy to parse,            Very hard to parse,
          hard to evolve             easy to change
            Uses DB                    Requires FS
           connections                    access

        Can cause app                Can fill up space
            crash



©2010 Improving Enterprises, Inc.
Best Practices
      Relate each message to generating point
              Code

                Data

      Format messages for readability

      Define .ToString on objects



©2010 Improving Enterprises, Inc.
More Best Practices

        Input and output
        Errors and exceptions
        Transitions
        Integration points
        Thread rendezvous

©2010 Improving Enterprises, Inc.
Practices to avoid
      Little information
       … // step 1
       Logger.info(“did something”);
       … // ste 2
       Logger.info(“did more work”);
       foreach (…) {
              … // useful work
       Logger.info(“working hard”);
       }


©2010 Improving Enterprises, Inc.
Practices to avoid (contd.)

       Long and boring




©2010 Improving Enterprises, Inc.
Practices to avoid (contd.)
      Side effects
      Logger.info(count++ “: did something”);

      Errors and exceptions
       Logger.info(m.GetValue());




©2010 Improving Enterprises, Inc.
Using the results




©2010 Improving Enterprises, Inc.
You’ve got logs!
      Rotate logs: by size, by time
              Retention policy
              2-level storage

      Provide access - read only!
      Transfer and analysis
              Warning: large datasets


©2010 Improving Enterprises, Inc.
Security and performance

                                    Moving and processing

                                    can impact performance

                                    Absolutely no sensitive
                                    data



©2010 Improving Enterprises, Inc.
Learning from the logs

                                    Never rely on eye-balling
                                      WYS is not WYG

                                      Aggregate data

                                    Distinguish common and
                                    rare


©2010 Improving Enterprises, Inc.
Tools
Process datasets:

       line by line
              grep, Perl, awk, cut, tail, head
       with less memory
              vi, notepad++

©2010 Improving Enterprises, Inc.
Logging For Fun and Profit

                                    Jane Prusakova

               Jane.Prusakova@ImprovingEnter
                           prises.com
               http://softwareandotherthings.blog
                            spot.com
                                    Improving Enterprises
                                      Houston TechFest
                                         09/08/2012
©2010 Improving Enterprises, Inc.
Upcoming Public Classes
        Object Oriented Design and Test Driven Development
                     Oct. 1st – Oct. 4th
      Agile Development with TFS
                     Oct. 8th – Oct. 11th
      Professional Scrum Master
                     Oct. 16th – Oct. 17th
      Agile QA with TFS
                     Oct. 24th – 26th

      Interested?
              Email training@improvingenterprises.com

©2010 Improving Enterprises, Inc.
Lunch and Learns / Assessments
         Lunch and Learns
              Have an Improver come to speak with your
              team on conceptual topics more targeted to
              your environment.
      Assessments
              Have an Improver assess your environment
              and lend some experience on technical
              topics.
      Interested? Contact –
      devlin.liles@improvingenterprises.com

©2010 Improving Enterprises, Inc.
Make it Happen in the Cloud:
           Windows Azure Developer Camp
      We will start with the basics and build on to more
      advanced topics, featuring hands-on labs for:
              Windows Azure Cloud Services
              Windows Azure SQL Database
              Windows Azure Virtual Machines
              Windows Azure Access Control Services
              Service Remoteing with Windows Azure Service Bus

      Presented by: Improving Enterprises
      When: October 22, 2012 9am-5pm
      Where: Microsoft Office Houston
      Registration: http://bit.ly/ImprovingAzure

©2010 Improving Enterprises, Inc.

More Related Content

What's hot

Slow and dirty with callouts
Slow and dirty with calloutsSlow and dirty with callouts
Slow and dirty with calloutsAgileOnTheBeach
 
JAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboardJAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboard
Michael Chaize
 
Sentri's Microsoft Cloud Webinar
Sentri's Microsoft Cloud WebinarSentri's Microsoft Cloud Webinar
Sentri's Microsoft Cloud Webinar
Sentri
 
The Agile CVD Test
The Agile CVD TestThe Agile CVD Test
The Agile CVD Test
AJ Igherighe
 
OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012
OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012 OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012
OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012
OCSL
 
Webinar: Move Your Business Forward with Cisco VOIP for SMB
Webinar: Move Your Business Forward with Cisco VOIP for SMBWebinar: Move Your Business Forward with Cisco VOIP for SMB
Webinar: Move Your Business Forward with Cisco VOIP for SMB
Advanced Logic Industries
 
Adobe flash platform java
Adobe flash platform javaAdobe flash platform java
Adobe flash platform java
Michael Chaize
 
STKI Summit 2010 Infra Pini
STKI Summit 2010 Infra PiniSTKI Summit 2010 Infra Pini
STKI Summit 2010 Infra Pini
Pini Cohen
 
Session 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTP
Session 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTPSession 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTP
Session 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTPPurnama Anaking
 
cfactor Social Business Solutions
cfactor Social Business Solutionscfactor Social Business Solutions
cfactor Social Business Solutions
ggivan
 
Intalio works japan seminar
Intalio works   japan seminarIntalio works   japan seminar
Intalio works japan seminarTomoaki Sawada
 
Eye Track Shop General Presentation Linked In
Eye Track Shop General Presentation Linked InEye Track Shop General Presentation Linked In
Eye Track Shop General Presentation Linked In
Kerrys
 
Invest In Smarter Collaboration Final V2
Invest In Smarter Collaboration Final V2Invest In Smarter Collaboration Final V2
Invest In Smarter Collaboration Final V2
Neil Burston
 
Itsmf itil 2011 demo
Itsmf itil 2011 demoItsmf itil 2011 demo
Itsmf itil 2011 demoitSMFThailand
 
NLJUG: Content Management, Standards, Opensource & JCP
NLJUG: Content Management, Standards, Opensource & JCPNLJUG: Content Management, Standards, Opensource & JCP
NLJUG: Content Management, Standards, Opensource & JCP
David Nuescheler
 
Identifying design requeriments
Identifying design requerimentsIdentifying design requeriments
Identifying design requeriments
Yohany Acosta
 
Velocity Technology Solutions Overview
Velocity Technology Solutions OverviewVelocity Technology Solutions Overview
Velocity Technology Solutions Overview
Velocity Technology Solutions
 
How cloud is transforming business and IT?
How cloud is transforming business and IT?How cloud is transforming business and IT?
How cloud is transforming business and IT?
Software Park Thailand
 

What's hot (19)

Slow and dirty with callouts
Slow and dirty with calloutsSlow and dirty with callouts
Slow and dirty with callouts
 
JAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboardJAX2010 Flex Java technical session: interactive dashboard
JAX2010 Flex Java technical session: interactive dashboard
 
Sentri's Microsoft Cloud Webinar
Sentri's Microsoft Cloud WebinarSentri's Microsoft Cloud Webinar
Sentri's Microsoft Cloud Webinar
 
The Agile CVD Test
The Agile CVD TestThe Agile CVD Test
The Agile CVD Test
 
OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012
OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012 OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012
OCSL - Microsoft System Center & Windows Server 2012 webinar March 2012
 
Webinar: Move Your Business Forward with Cisco VOIP for SMB
Webinar: Move Your Business Forward with Cisco VOIP for SMBWebinar: Move Your Business Forward with Cisco VOIP for SMB
Webinar: Move Your Business Forward with Cisco VOIP for SMB
 
Adobe flash platform java
Adobe flash platform javaAdobe flash platform java
Adobe flash platform java
 
STKI Summit 2010 Infra Pini
STKI Summit 2010 Infra PiniSTKI Summit 2010 Infra Pini
STKI Summit 2010 Infra Pini
 
Klimenok telepresence
Klimenok telepresenceKlimenok telepresence
Klimenok telepresence
 
Session 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTP
Session 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTPSession 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTP
Session 2 - E Business Basic Infrastructure # Subversion, Hosting, Domain, FTP
 
cfactor Social Business Solutions
cfactor Social Business Solutionscfactor Social Business Solutions
cfactor Social Business Solutions
 
Intalio works japan seminar
Intalio works   japan seminarIntalio works   japan seminar
Intalio works japan seminar
 
Eye Track Shop General Presentation Linked In
Eye Track Shop General Presentation Linked InEye Track Shop General Presentation Linked In
Eye Track Shop General Presentation Linked In
 
Invest In Smarter Collaboration Final V2
Invest In Smarter Collaboration Final V2Invest In Smarter Collaboration Final V2
Invest In Smarter Collaboration Final V2
 
Itsmf itil 2011 demo
Itsmf itil 2011 demoItsmf itil 2011 demo
Itsmf itil 2011 demo
 
NLJUG: Content Management, Standards, Opensource & JCP
NLJUG: Content Management, Standards, Opensource & JCPNLJUG: Content Management, Standards, Opensource & JCP
NLJUG: Content Management, Standards, Opensource & JCP
 
Identifying design requeriments
Identifying design requerimentsIdentifying design requeriments
Identifying design requeriments
 
Velocity Technology Solutions Overview
Velocity Technology Solutions OverviewVelocity Technology Solutions Overview
Velocity Technology Solutions Overview
 
How cloud is transforming business and IT?
How cloud is transforming business and IT?How cloud is transforming business and IT?
How cloud is transforming business and IT?
 

Viewers also liked

Application logging for fun and profit
Application logging for fun and profitApplication logging for fun and profit
Application logging for fun and profitJane Prusakova
 
What is good code?
What is good code?What is good code?
What is good code?
Jane Prusakova
 
Pragmatic Agile: distributed teams
Pragmatic Agile: distributed teamsPragmatic Agile: distributed teams
Pragmatic Agile: distributed teams
Jane Prusakova
 
Lets talk About Good Code (Dallas TechFest 2014)
Lets talk About Good Code (Dallas TechFest 2014)Lets talk About Good Code (Dallas TechFest 2014)
Lets talk About Good Code (Dallas TechFest 2014)
Jane Prusakova
 
The power of nudge. Building great teams.
The power of nudge. Building great teams. The power of nudge. Building great teams.
The power of nudge. Building great teams.
Jane Prusakova
 
A case for remote teams
A case for remote teamsA case for remote teams
A case for remote teams
Jane Prusakova
 
Effective Code Review
Effective Code ReviewEffective Code Review
Effective Code Review
Jane Prusakova
 
Motivating Knowledge Workers
Motivating Knowledge WorkersMotivating Knowledge Workers
Motivating Knowledge Workers
Jane Prusakova
 
Privacy In The Digital Age
Privacy In The Digital AgePrivacy In The Digital Age
Privacy In The Digital Age
Jane Prusakova
 
Women in Technology. Things that hold women back.
Women in Technology. Things that hold women back. Women in Technology. Things that hold women back.
Women in Technology. Things that hold women back.
Jane Prusakova
 
Building great teams: the power of a nudge.
Building great teams: the power of a nudge.  Building great teams: the power of a nudge.
Building great teams: the power of a nudge.
Jane Prusakova
 
Application Logging for large systems
Application Logging for large systemsApplication Logging for large systems
Application Logging for large systems
Jane Prusakova
 
Interview: a Learning Conversation
Interview: a Learning ConversationInterview: a Learning Conversation
Interview: a Learning Conversation
Jane Prusakova
 
Lets talk about good code
Lets talk about good codeLets talk about good code
Lets talk about good code
Jane Prusakova
 
Effective Code Review
Effective Code ReviewEffective Code Review
Effective Code Review
Jane Prusakova
 

Viewers also liked (15)

Application logging for fun and profit
Application logging for fun and profitApplication logging for fun and profit
Application logging for fun and profit
 
What is good code?
What is good code?What is good code?
What is good code?
 
Pragmatic Agile: distributed teams
Pragmatic Agile: distributed teamsPragmatic Agile: distributed teams
Pragmatic Agile: distributed teams
 
Lets talk About Good Code (Dallas TechFest 2014)
Lets talk About Good Code (Dallas TechFest 2014)Lets talk About Good Code (Dallas TechFest 2014)
Lets talk About Good Code (Dallas TechFest 2014)
 
The power of nudge. Building great teams.
The power of nudge. Building great teams. The power of nudge. Building great teams.
The power of nudge. Building great teams.
 
A case for remote teams
A case for remote teamsA case for remote teams
A case for remote teams
 
Effective Code Review
Effective Code ReviewEffective Code Review
Effective Code Review
 
Motivating Knowledge Workers
Motivating Knowledge WorkersMotivating Knowledge Workers
Motivating Knowledge Workers
 
Privacy In The Digital Age
Privacy In The Digital AgePrivacy In The Digital Age
Privacy In The Digital Age
 
Women in Technology. Things that hold women back.
Women in Technology. Things that hold women back. Women in Technology. Things that hold women back.
Women in Technology. Things that hold women back.
 
Building great teams: the power of a nudge.
Building great teams: the power of a nudge.  Building great teams: the power of a nudge.
Building great teams: the power of a nudge.
 
Application Logging for large systems
Application Logging for large systemsApplication Logging for large systems
Application Logging for large systems
 
Interview: a Learning Conversation
Interview: a Learning ConversationInterview: a Learning Conversation
Interview: a Learning Conversation
 
Lets talk about good code
Lets talk about good codeLets talk about good code
Lets talk about good code
 
Effective Code Review
Effective Code ReviewEffective Code Review
Effective Code Review
 

Similar to Application Logging for fun and profit. Houston TechFest 2012

Building a great team: power of a nudge.
Building a great team: power of a nudge.Building a great team: power of a nudge.
Building a great team: power of a nudge.
Jane Prusakova
 
Boeing Webinar - Integrating Quality in Portfolio Management - oct 2010
Boeing Webinar - Integrating Quality in Portfolio Management -  oct 2010Boeing Webinar - Integrating Quality in Portfolio Management -  oct 2010
Boeing Webinar - Integrating Quality in Portfolio Management - oct 2010
Brent Barton
 
Oracle Fusion applications 101 [2010 OAUG Collaborate]
Oracle Fusion applications 101 [2010 OAUG Collaborate]Oracle Fusion applications 101 [2010 OAUG Collaborate]
Oracle Fusion applications 101 [2010 OAUG Collaborate]
Rhapsody Technologies, Inc.
 
VS TFS 2010 - Part1
VS TFS 2010 - Part1VS TFS 2010 - Part1
VS TFS 2010 - Part1
Dareen Alhiyari
 
Windows Azure overview webinar by Sentri
Windows Azure overview webinar by SentriWindows Azure overview webinar by Sentri
Windows Azure overview webinar by Sentri
Sentri
 
How to Make the Business Case for a CMS in Your Organization
How to Make the Business Case for a CMS in Your OrganizationHow to Make the Business Case for a CMS in Your Organization
How to Make the Business Case for a CMS in Your Organization
Sarah Silveri, RSI Content Solutions
 
Accenture and OpenStack
Accenture and OpenStackAccenture and OpenStack
Accenture and OpenStackOpen Stack
 
Flex and the city in London - Keynote
Flex and the city in London - KeynoteFlex and the city in London - Keynote
Flex and the city in London - Keynote
Michael Chaize
 
Does DITA need XML?
Does DITA need XML?Does DITA need XML?
Does DITA need XML?
Michael Priestley
 
Demo Slides: Application Release Automation with Deployit
Demo Slides: Application Release Automation with DeployitDemo Slides: Application Release Automation with Deployit
Demo Slides: Application Release Automation with DeployitXebiaLabs
 
Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010Anna Russo
 
XebiaLabs Overview Slides
XebiaLabs Overview SlidesXebiaLabs Overview Slides
XebiaLabs Overview Slides
XebiaLabs
 
Performance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet ApplicationsPerformance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet ApplicationsBen Rushlo
 
Gtl Corporate Presentation
Gtl Corporate PresentationGtl Corporate Presentation
Gtl Corporate Presentation
Dipankar_Das
 
TIRTA ERP
TIRTA ERPTIRTA ERP
TIRTA ERP
Wildan Maulana
 
Saa s webinar slides final rlh - 3-31
Saa s webinar slides   final rlh - 3-31Saa s webinar slides   final rlh - 3-31
Saa s webinar slides final rlh - 3-31
neerajarasmussen
 
Integrating Quality into Portfolio Management
Integrating Quality into Portfolio Management Integrating Quality into Portfolio Management
Integrating Quality into Portfolio Management
Brent Barton
 
Cost Plus Pricing
Cost Plus PricingCost Plus Pricing
Cost Plus Pricing
Harkirat Bedi
 
DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?
Michael Elder
 

Similar to Application Logging for fun and profit. Houston TechFest 2012 (20)

Building a great team: power of a nudge.
Building a great team: power of a nudge.Building a great team: power of a nudge.
Building a great team: power of a nudge.
 
Boeing Webinar - Integrating Quality in Portfolio Management - oct 2010
Boeing Webinar - Integrating Quality in Portfolio Management -  oct 2010Boeing Webinar - Integrating Quality in Portfolio Management -  oct 2010
Boeing Webinar - Integrating Quality in Portfolio Management - oct 2010
 
Oracle Fusion applications 101 [2010 OAUG Collaborate]
Oracle Fusion applications 101 [2010 OAUG Collaborate]Oracle Fusion applications 101 [2010 OAUG Collaborate]
Oracle Fusion applications 101 [2010 OAUG Collaborate]
 
VS TFS 2010 - Part1
VS TFS 2010 - Part1VS TFS 2010 - Part1
VS TFS 2010 - Part1
 
Windows Azure overview webinar by Sentri
Windows Azure overview webinar by SentriWindows Azure overview webinar by Sentri
Windows Azure overview webinar by Sentri
 
How to Make the Business Case for a CMS in Your Organization
How to Make the Business Case for a CMS in Your OrganizationHow to Make the Business Case for a CMS in Your Organization
How to Make the Business Case for a CMS in Your Organization
 
Accenture and OpenStack
Accenture and OpenStackAccenture and OpenStack
Accenture and OpenStack
 
Flex and the city in London - Keynote
Flex and the city in London - KeynoteFlex and the city in London - Keynote
Flex and the city in London - Keynote
 
Does DITA need XML?
Does DITA need XML?Does DITA need XML?
Does DITA need XML?
 
Start > Automate > Create | Book Publishing in the Cloud
Start > Automate > Create | Book Publishing in the CloudStart > Automate > Create | Book Publishing in the Cloud
Start > Automate > Create | Book Publishing in the Cloud
 
Demo Slides: Application Release Automation with Deployit
Demo Slides: Application Release Automation with DeployitDemo Slides: Application Release Automation with Deployit
Demo Slides: Application Release Automation with Deployit
 
Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010
 
XebiaLabs Overview Slides
XebiaLabs Overview SlidesXebiaLabs Overview Slides
XebiaLabs Overview Slides
 
Performance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet ApplicationsPerformance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet Applications
 
Gtl Corporate Presentation
Gtl Corporate PresentationGtl Corporate Presentation
Gtl Corporate Presentation
 
TIRTA ERP
TIRTA ERPTIRTA ERP
TIRTA ERP
 
Saa s webinar slides final rlh - 3-31
Saa s webinar slides   final rlh - 3-31Saa s webinar slides   final rlh - 3-31
Saa s webinar slides final rlh - 3-31
 
Integrating Quality into Portfolio Management
Integrating Quality into Portfolio Management Integrating Quality into Portfolio Management
Integrating Quality into Portfolio Management
 
Cost Plus Pricing
Cost Plus PricingCost Plus Pricing
Cost Plus Pricing
 
DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?
 

More from Jane Prusakova

Software architecture houstontechfest2020
Software architecture houstontechfest2020Software architecture houstontechfest2020
Software architecture houstontechfest2020
Jane Prusakova
 
Estimating software development
Estimating software developmentEstimating software development
Estimating software development
Jane Prusakova
 
Better remote teams
Better remote teamsBetter remote teams
Better remote teams
Jane Prusakova
 
Thoughts on building software architecture
Thoughts on building software architectureThoughts on building software architecture
Thoughts on building software architecture
Jane Prusakova
 
Improving IT Performance
Improving IT PerformanceImproving IT Performance
Improving IT Performance
Jane Prusakova
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
Jane Prusakova
 
Questions of Ethics in Software Development
Questions of Ethics in Software DevelopmentQuestions of Ethics in Software Development
Questions of Ethics in Software Development
Jane Prusakova
 
Just startcoding
Just startcodingJust startcoding
Just startcoding
Jane Prusakova
 
Just start coding
Just start codingJust start coding
Just start coding
Jane Prusakova
 
Good code
Good codeGood code
Good code
Jane Prusakova
 
Managing remote teams.
Managing remote teams.Managing remote teams.
Managing remote teams.
Jane Prusakova
 
Gender-neutral Recruiting
Gender-neutral RecruitingGender-neutral Recruiting
Gender-neutral Recruiting
Jane Prusakova
 
Running Java safely
Running Java safelyRunning Java safely
Running Java safely
Jane Prusakova
 

More from Jane Prusakova (13)

Software architecture houstontechfest2020
Software architecture houstontechfest2020Software architecture houstontechfest2020
Software architecture houstontechfest2020
 
Estimating software development
Estimating software developmentEstimating software development
Estimating software development
 
Better remote teams
Better remote teamsBetter remote teams
Better remote teams
 
Thoughts on building software architecture
Thoughts on building software architectureThoughts on building software architecture
Thoughts on building software architecture
 
Improving IT Performance
Improving IT PerformanceImproving IT Performance
Improving IT Performance
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Questions of Ethics in Software Development
Questions of Ethics in Software DevelopmentQuestions of Ethics in Software Development
Questions of Ethics in Software Development
 
Just startcoding
Just startcodingJust startcoding
Just startcoding
 
Just start coding
Just start codingJust start coding
Just start coding
 
Good code
Good codeGood code
Good code
 
Managing remote teams.
Managing remote teams.Managing remote teams.
Managing remote teams.
 
Gender-neutral Recruiting
Gender-neutral RecruitingGender-neutral Recruiting
Gender-neutral Recruiting
 
Running Java safely
Running Java safelyRunning Java safely
Running Java safely
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Application Logging for fun and profit. Houston TechFest 2012

  • 1. Logging For Fun and Profit Jane Prusakova Jane.Prusakova@ImprovingEnter prises.com http://softwareandotherthings.blog spot.com Improving Enterprises Houston TechFest 09/08/2012 ©2010 Improving Enterprises, Inc.
  • 2. Why How-to Using the results ©2010 Improving Enterprises, Inc.
  • 3. Why logging? Enquiring minds want to know! Avoid programming-by-coincidence Trace what the users do See effects of Integration Multithreading High load ©2010 Improving Enterprises, Inc.
  • 4. When to use logging? Greenfield development Brownfield development what came before the effect of changes Maintenance and troubleshooting trace bugs Bonus Evolve apps based on users behavior ©2010 Improving Enterprises, Inc.
  • 5. Logging vs Debugging Set up once, always ready to use Minimum disruption to the flow Works locally and in the cloud Faster data collection Collected data is persisted ©2010 Improving Enterprises, Inc.
  • 6. How-to Using the results ©2010 Improving Enterprises, Inc.
  • 7. Yes, I want to setup logging! Pick a framework Proper configuration Consider ways to parse logs Logging will change with the application ©2010 Improving Enterprises, Inc.
  • 8. Frameworks Log4net Nlog Apache BSD Logs arrays Integrates with MSMQ Configuration, log levels and categories, rotate log files, thread-safe logging. Support: online documentation, tutorials, online forums. ©2010 Improving Enterprises, Inc.
  • 9. Planning and Strategy Enough and but not too much Preserve correctness readability of the code performance ©2010 Improving Enterprises, Inc.
  • 10. Planning and Strategy (contd.) Database Files Easy to parse, Very hard to parse, hard to evolve easy to change Uses DB Requires FS connections access Can cause app Can fill up space crash ©2010 Improving Enterprises, Inc.
  • 11. Best Practices Relate each message to generating point Code Data Format messages for readability Define .ToString on objects ©2010 Improving Enterprises, Inc.
  • 12. More Best Practices Input and output Errors and exceptions Transitions Integration points Thread rendezvous ©2010 Improving Enterprises, Inc.
  • 13. Practices to avoid Little information … // step 1 Logger.info(“did something”); … // ste 2 Logger.info(“did more work”); foreach (…) { … // useful work Logger.info(“working hard”); } ©2010 Improving Enterprises, Inc.
  • 14. Practices to avoid (contd.) Long and boring ©2010 Improving Enterprises, Inc.
  • 15. Practices to avoid (contd.) Side effects Logger.info(count++ “: did something”); Errors and exceptions Logger.info(m.GetValue()); ©2010 Improving Enterprises, Inc.
  • 16. Using the results ©2010 Improving Enterprises, Inc.
  • 17. You’ve got logs! Rotate logs: by size, by time Retention policy 2-level storage Provide access - read only! Transfer and analysis Warning: large datasets ©2010 Improving Enterprises, Inc.
  • 18. Security and performance Moving and processing can impact performance Absolutely no sensitive data ©2010 Improving Enterprises, Inc.
  • 19. Learning from the logs Never rely on eye-balling WYS is not WYG Aggregate data Distinguish common and rare ©2010 Improving Enterprises, Inc.
  • 20. Tools Process datasets: line by line grep, Perl, awk, cut, tail, head with less memory vi, notepad++ ©2010 Improving Enterprises, Inc.
  • 21. Logging For Fun and Profit Jane Prusakova Jane.Prusakova@ImprovingEnter prises.com http://softwareandotherthings.blog spot.com Improving Enterprises Houston TechFest 09/08/2012 ©2010 Improving Enterprises, Inc.
  • 22. Upcoming Public Classes Object Oriented Design and Test Driven Development Oct. 1st – Oct. 4th Agile Development with TFS Oct. 8th – Oct. 11th Professional Scrum Master Oct. 16th – Oct. 17th Agile QA with TFS Oct. 24th – 26th Interested? Email training@improvingenterprises.com ©2010 Improving Enterprises, Inc.
  • 23. Lunch and Learns / Assessments Lunch and Learns Have an Improver come to speak with your team on conceptual topics more targeted to your environment. Assessments Have an Improver assess your environment and lend some experience on technical topics. Interested? Contact – devlin.liles@improvingenterprises.com ©2010 Improving Enterprises, Inc.
  • 24. Make it Happen in the Cloud: Windows Azure Developer Camp We will start with the basics and build on to more advanced topics, featuring hands-on labs for: Windows Azure Cloud Services Windows Azure SQL Database Windows Azure Virtual Machines Windows Azure Access Control Services Service Remoteing with Windows Azure Service Bus Presented by: Improving Enterprises When: October 22, 2012 9am-5pm Where: Microsoft Office Houston Registration: http://bit.ly/ImprovingAzure ©2010 Improving Enterprises, Inc.

Editor's Notes

  1. Shilpa: Without proper planning and clear strategy, the log messages produced by the system may not be useful for problem resolution.Effective logging is a balance between logging enough data to debug problems, while not dumping so much it confuses the issue.
  2. Shilpa: Without proper planning and clear strategy, the log messages produced by the system may not be useful for problem resolution.Effective logging is a balance between logging enough data to debug problems, while not dumping so much it confuses the issue.
  3. Both Log4net and Nlog are open source, free libraries. Well-used and well-loved, mature technologies, that are known to work very well. No option to buy corporate support, but there is plenty of free support from the user community available online.
  4. While I prefer to log to a file: More flexibility to change what is being loggedLogging doesn’t compete with the application for DB connectionsDB access is broken more often than file accessWhy you may choose to log to the DB: Easier to parse logsIt is possible to use Aspects to separate logging concerns from the application logic - for logs that are stable. If you use logging to trace problems as the application is being developed and maintained – putting logs with the code is simpler and helps to shorted the development cycle.
  5. While I prefer to log to a file: More flexibility to change what is being loggedLogging doesn’t compete with the application for DB connectionsDB access is broken more often than file accessWhy you may choose to log to the DB: Easier to parse logsIt is possible to use Aspects to separate logging concerns from the application logic - for logs that are stable. If you use logging to trace problems as the application is being developed and maintained – putting logs with the code is simpler and helps to shorted the development cycle.
  6. Go back to examples
  7. Go back to examples
  8. Unless step 1 or step 2 throw, we already know both will happen – no need to log the second.When putting loggin inside a loop, it’s helpful to record loop counter and the item being processed.
  9. It is important that logs are dense with information. If logging an object with no ToString method, it’s full type name will be printed – bad.Frameworks provide a way to post file and line from where logging is done – no need to do it in text.
  10. Shilpa: Without proper planning and clear strategy, the log messages produced by the system may not be useful for problem resolution.Effective logging is a balance between logging enough data to debug problems, while not dumping so much it confuses the issue.
  11. How to handle large log files,e.g Roll the files.... (zip them up after certain days etc....)
  12. A rare bug is harder to trace – and usually presents less of a problem to the business. When arbitraging future work, use logs to learn what users want.