SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Developer Fundamentals

              LOGGING

                    BY
AXEL IRRIGER (HTTP://WWW.AXELIRRIGER.DE)
                MAY, 2010
Agenda

 About Myself

 What Is Logging?
     Storyboard
     Analysis
     Definition

 Why Do We Want To Log Things?

 How Do We Do Logging?
     Logically
     Technically
About Myself

 Software/Solution Architect with a consulting
  company in Germany

 Dealing with software since the age of 10
     Atari ST … Basic, Assembler, Pascal

 Primarily dealing with Java and Python nowadays
     EAI, SOA, BPM
     JBossAS 4 and JBossAS 5
     Apache ServiceMix, jBPM, JBoss Rules
     …

 Passion
     Software Quality
     Excellence in Craftsmanship

 Drop me a message axel (dot) irriger (at) gmail (dot) com
What Is Logging? - Storyboard

John and Will are software developers. They are both
  experienced and get things done, literary speaken.

On a tough assignment, they get errors and the software
 does not, what it should. Since they both short on
 schedule, they need to get that error fixed quickly, to not
 burn the deadline to ashes.

What will they do?
What Is Logging? –John‘s Way

John automatically fires up his favorite debugger and
  starts digging around the code, where it expects the
  error to be.
After some hours passing, digging here, poking there,
  he located the error and got it fixed.
It was in a different module than he first expected –
  but who cares, the job is done and the clock shows
  11pm.
What Is Logging? –Will‘s Way

Will gets curious – why in hell must this happen know? But it is, as it
 is. So, he fires up his IDE and reconfigures the logging system to
 „debug“ and starts the application again.

After some 5-10 minutes looking through the log files, he gets curious
  – there‘s something wrong in this XYZ module. Though he doesn‘t
  know what.
So, he again reconfigures the logging system again to „trace“ and
  starts his run again. Filtering out the logs pretty quickly he sees that
  gets wrong … that parameter should look different!
He fixes the issue and starts again – everything‘s fine now.

It‘s 6pm, a little late, but just in time for dinner.
What Is Logging? – Analysis

 John did not care about logging – it just takes time and
  gets you nothing. That cost him time, overall

 Will did care about logging, to be able to fix things faster
   Logging helped him see, what the application did

   He could locate the issue at hand more quickly and pin down the
    suspected piece of code
   He needed not do any intense digging but just read output
What Is Logging? – Definition

 Logging is about letting the program speak what it does
 Using fine-grained thresholds, from the most generic to
 the most detailed information, information is written to a
 log

 Logging is the process of noting down processing steps to
 document
    What is done
    With what data it is done
    What the outcome is
Why Do We Want To Log Things?

 Understanding and Documentation
   Being able to provide good logging helps yourself to better
    understand the code
   Reading through log messages helps new developers to more easily
    grasp your intentions
 Bug fixing
   Detect errors more easily
   Detect strange variable values more easily
   Find the error vs. Look for the error

 Support
   Really want to do endless iterations with a customer, or just get the
    logs and start working?
How Do We Do Logging? - Logically

 What to log?
   Method/Function entry and exist  You want to know where
    the program walks along
   General information like starting, stopping, configuring  You
    want to see the „big picture“ of the program
   External information and computations  You want explicitly
    see what can‘t be seen (RDBMS input, run-timecomputations,
    etc.)
   Parameters passed  You want to see, how things happened
    and why
 Log frameworks offer granularity – use it
How Do We Do Logging? - Logically

 How should levels be used?
    FATAL  everything which stops the program from continuing (no
     RDBMS, unable to read system files)
    ERROR  everything which is erroneous, but does not stop te
     program from continuing (Mail adresses not found, so no mailing)
    WARN  If defaults are used, because no configuration was passed
     and things like that
    INFO  General informations
    DEBUG  External informations, Control-Flow decisions
    TRACE  Method/Function entry/exit, Parameters


 Use this as a convention until you feel comfortable
 When you‘re comfortable, adjust to your habbits
How Do We Do Logging? - Technically

 Decide on the framework and stick to that
     java.util.logging – Provided out of the box
     Apache log4j (log4j) – The widest usage
     Apache Commons::Logging (commons-logging) – Abstraction layer for other frameworks
     Simple Logging Facade for Java (slf4j) – Simpler abstraction layer for other frameworks

 Get familiar to your framework
     How to use categories to filter things
     How to filter out unimportant stuff
     How to use appenders to utilize different log files
     How to use loggers to support Console, File, SMTP, SNMP, ...

 Always use something like „isDebugEnabled“ or „isLevelEnabled“
     Don‘t even try to log something if it wouldn‘t be written
         LOG.debug huge messages with „debug“ disabled has huge performance impact
         Message will be serialized (costly) and then skipped!
Summary

 We have seen why logging is worth a consideration
 We have seen why we want to do logging at all
 We have seen how logging should be approached
  logically („from the brain“)
 We have seen how logging should be approached
  technically („from the keyboard“)

 Various logging frameworks will be discussed in ongoing
 sessions
              Get out and your hands dirty!

Weitere ähnliche Inhalte

Ähnlich wie Developer Fundamentals - Logging

Functional node.js
Functional node.jsFunctional node.js
Functional node.jsCarob Cherub
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Acquia
 
Functional and non functional application logging
Functional and non functional application loggingFunctional and non functional application logging
Functional and non functional application loggingSander De Vos
 
MojoPortal And Log4net
MojoPortal And Log4netMojoPortal And Log4net
MojoPortal And Log4netVerifiedAD.com
 
TDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit HappensTDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit HappensJackson F. de A. Mafra
 
Chelberg ptcuser 2010
Chelberg ptcuser 2010Chelberg ptcuser 2010
Chelberg ptcuser 2010Clay Helberg
 
How to Use OWASP Security Logging
How to Use OWASP Security LoggingHow to Use OWASP Security Logging
How to Use OWASP Security LoggingMilton Smith
 
Linux multiplexing
Linux multiplexingLinux multiplexing
Linux multiplexingMark Veltzer
 
Kibana+ElasticSearch+LogStash to handle Log messages on Prod servers
Kibana+ElasticSearch+LogStash to handle Log messages on Prod serversKibana+ElasticSearch+LogStash to handle Log messages on Prod servers
Kibana+ElasticSearch+LogStash to handle Log messages on Prod serversHYS Enterprise
 
Six Mistakes of Log Management 2008
Six Mistakes of Log Management 2008Six Mistakes of Log Management 2008
Six Mistakes of Log Management 2008Anton Chuvakin
 
How to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production ServicesHow to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production ServicesChristian Beedgen
 

Ähnlich wie Developer Fundamentals - Logging (20)

WoMakersCode 2016 - Shit Happens
WoMakersCode 2016 -  Shit HappensWoMakersCode 2016 -  Shit Happens
WoMakersCode 2016 - Shit Happens
 
Functional node.js
Functional node.jsFunctional node.js
Functional node.js
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
 
Functional and non functional application logging
Functional and non functional application loggingFunctional and non functional application logging
Functional and non functional application logging
 
MojoPortal And Log4net
MojoPortal And Log4netMojoPortal And Log4net
MojoPortal And Log4net
 
TDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit HappensTDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit Happens
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
Chelberg ptcuser 2010
Chelberg ptcuser 2010Chelberg ptcuser 2010
Chelberg ptcuser 2010
 
Data analysis with pandas
Data analysis with pandasData analysis with pandas
Data analysis with pandas
 
Data Analysis With Pandas
Data Analysis With PandasData Analysis With Pandas
Data Analysis With Pandas
 
How to Use OWASP Security Logging
How to Use OWASP Security LoggingHow to Use OWASP Security Logging
How to Use OWASP Security Logging
 
Linux multiplexing
Linux multiplexingLinux multiplexing
Linux multiplexing
 
Kibana+ElasticSearch+LogStash to handle Log messages on Prod servers
Kibana+ElasticSearch+LogStash to handle Log messages on Prod serversKibana+ElasticSearch+LogStash to handle Log messages on Prod servers
Kibana+ElasticSearch+LogStash to handle Log messages on Prod servers
 
Six Mistakes of Log Management 2008
Six Mistakes of Log Management 2008Six Mistakes of Log Management 2008
Six Mistakes of Log Management 2008
 
Php rules
Php rulesPhp rules
Php rules
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
 
Fp201 unit1 1
Fp201 unit1 1Fp201 unit1 1
Fp201 unit1 1
 
How to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production ServicesHow to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
How to Meta-Sumo - Using Logs for Agile Monitoring of Production Services
 
PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
 
Php rules
Php rulesPhp rules
Php rules
 

Kürzlich hochgeladen

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 

Kürzlich hochgeladen (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 

Developer Fundamentals - Logging

  • 1. Developer Fundamentals LOGGING BY AXEL IRRIGER (HTTP://WWW.AXELIRRIGER.DE) MAY, 2010
  • 2. Agenda  About Myself  What Is Logging?  Storyboard  Analysis  Definition  Why Do We Want To Log Things?  How Do We Do Logging?  Logically  Technically
  • 3. About Myself  Software/Solution Architect with a consulting company in Germany  Dealing with software since the age of 10  Atari ST … Basic, Assembler, Pascal  Primarily dealing with Java and Python nowadays  EAI, SOA, BPM  JBossAS 4 and JBossAS 5  Apache ServiceMix, jBPM, JBoss Rules  …  Passion  Software Quality  Excellence in Craftsmanship  Drop me a message axel (dot) irriger (at) gmail (dot) com
  • 4. What Is Logging? - Storyboard John and Will are software developers. They are both experienced and get things done, literary speaken. On a tough assignment, they get errors and the software does not, what it should. Since they both short on schedule, they need to get that error fixed quickly, to not burn the deadline to ashes. What will they do?
  • 5. What Is Logging? –John‘s Way John automatically fires up his favorite debugger and starts digging around the code, where it expects the error to be. After some hours passing, digging here, poking there, he located the error and got it fixed. It was in a different module than he first expected – but who cares, the job is done and the clock shows 11pm.
  • 6. What Is Logging? –Will‘s Way Will gets curious – why in hell must this happen know? But it is, as it is. So, he fires up his IDE and reconfigures the logging system to „debug“ and starts the application again. After some 5-10 minutes looking through the log files, he gets curious – there‘s something wrong in this XYZ module. Though he doesn‘t know what. So, he again reconfigures the logging system again to „trace“ and starts his run again. Filtering out the logs pretty quickly he sees that gets wrong … that parameter should look different! He fixes the issue and starts again – everything‘s fine now. It‘s 6pm, a little late, but just in time for dinner.
  • 7. What Is Logging? – Analysis  John did not care about logging – it just takes time and gets you nothing. That cost him time, overall  Will did care about logging, to be able to fix things faster  Logging helped him see, what the application did  He could locate the issue at hand more quickly and pin down the suspected piece of code  He needed not do any intense digging but just read output
  • 8. What Is Logging? – Definition  Logging is about letting the program speak what it does  Using fine-grained thresholds, from the most generic to the most detailed information, information is written to a log  Logging is the process of noting down processing steps to document  What is done  With what data it is done  What the outcome is
  • 9. Why Do We Want To Log Things?  Understanding and Documentation  Being able to provide good logging helps yourself to better understand the code  Reading through log messages helps new developers to more easily grasp your intentions  Bug fixing  Detect errors more easily  Detect strange variable values more easily  Find the error vs. Look for the error  Support  Really want to do endless iterations with a customer, or just get the logs and start working?
  • 10. How Do We Do Logging? - Logically  What to log?  Method/Function entry and exist  You want to know where the program walks along  General information like starting, stopping, configuring  You want to see the „big picture“ of the program  External information and computations  You want explicitly see what can‘t be seen (RDBMS input, run-timecomputations, etc.)  Parameters passed  You want to see, how things happened and why  Log frameworks offer granularity – use it
  • 11. How Do We Do Logging? - Logically  How should levels be used?  FATAL  everything which stops the program from continuing (no RDBMS, unable to read system files)  ERROR  everything which is erroneous, but does not stop te program from continuing (Mail adresses not found, so no mailing)  WARN  If defaults are used, because no configuration was passed and things like that  INFO  General informations  DEBUG  External informations, Control-Flow decisions  TRACE  Method/Function entry/exit, Parameters  Use this as a convention until you feel comfortable  When you‘re comfortable, adjust to your habbits
  • 12. How Do We Do Logging? - Technically  Decide on the framework and stick to that  java.util.logging – Provided out of the box  Apache log4j (log4j) – The widest usage  Apache Commons::Logging (commons-logging) – Abstraction layer for other frameworks  Simple Logging Facade for Java (slf4j) – Simpler abstraction layer for other frameworks  Get familiar to your framework  How to use categories to filter things  How to filter out unimportant stuff  How to use appenders to utilize different log files  How to use loggers to support Console, File, SMTP, SNMP, ...  Always use something like „isDebugEnabled“ or „isLevelEnabled“  Don‘t even try to log something if it wouldn‘t be written  LOG.debug huge messages with „debug“ disabled has huge performance impact  Message will be serialized (costly) and then skipped!
  • 13. Summary  We have seen why logging is worth a consideration  We have seen why we want to do logging at all  We have seen how logging should be approached logically („from the brain“)  We have seen how logging should be approached technically („from the keyboard“)  Various logging frameworks will be discussed in ongoing sessions Get out and your hands dirty!