SlideShare a Scribd company logo
1 of 42
Download to read offline
WORLD OF LOGGING
Christian Grobmeier
         @grobmeier
  http://www.grobmeier.de
Why should you log?
T    H    E
BIGGEST
CHALLENGES
WE   H AV E
a
SPEED!
Failsafe. Reliable.
Compability.
Taste.
Logging
with Duke
Java
Too much
taste...
m a k e s
headache!

     Think on:
 log4j, logback, JUL,
   TinyLog, AVSL
Pills:
slf4j & Commons Logging
Which pill?

              slf4j

 log4j 1     logback JUL AVSL
       log4j 2

       Commons Logging
                      Don‘t forget PAX!
log4j 2.0
      is the
future
  of log4j

Integrates well with:
        slf4j
      log4j 1.x
 Commons Logging
What makes
log4j 2.0
  better?
API++
                     Instead:
if(logger.isDebugEnabled())
   logger.info("Hi, " + u.getA() + “ “ + u.getB());
API++
                     Instead:
if(logger.isDebugEnabled())
   logger.info("Hi, " + u.getA() + “ “ + u.getB());




                     Write:
logger.info("Hi, {} {} ", u.getA(), u.getB());
Better Filter
               Marker:
Marker SQL_MARKER =
  MarkerManager.getMarker("SQL");

logger.debug(
     SQL_MARKER,
     "SELECT * FROM {}", table);
Plugins
@Plugin(name = "Sandbox",
         type = "Core",
         elementType = "appender")
public class Mine extends AppenderBase {

 private Mine(String name, Filter f) {
   super(name, f, null);
 }

 public void append(LogEvent e) { … }
Plugins

@PluginFactory
public static Mine create(
  @PluginAttr("name") String n,
  @PluginElement("filters") Filter f) {
  return new Mine(n, f);
}
Configuration
<appenders>
 <Console name="Console"
          target="SYSTEM_OUT">
   <PatternLayout
       pattern="%d{HH:mm} %msg%n"/>
 </Console>
</appenders>
Configuration
{ "configuration":
   …
   "appenders": {
     "Console": {
        "name": "STDOUT",
        "PatternLayout": { "pattern": "%m%n" }
     },
    ...
Configuration
      Reloading
<configuration monitorInterval="30">
...
</configuration>
log4j 1.x              2314
 logback             2116
log4j 2.x              2386
Disabled    5


                SPEED!
Logging Performance in ns
There is
  more
sweetness
CHAINSAW
The story of
log4php




2004 2007 2009 2010
What‘s with...
log4net
log4cxx
The story of
log4php

      Community
Good times,
bad times




2000 2009 2010 2011
We need your
  HELP


Currently only
4 regular code
contributors.
But we
FIGHT!

6 Releases
~750 Commits
~600 dev Mails

in 2012 only!
Seriously.
Isn‘t logging just
BORING?
Well... how
do you log on
your mobile/
cloud apps?
With new innovation,
new logging challenges
      come up.
 Logging needs
innovation too.
Look at Apache Flume.
Upcoming at the Incubator
 Guice Components
Instead:
Logger logger = Logger.getLogger( „test“);
Instead:
Logger logger = Logger.getLogger( „test“);


                Write:
             @InjectLogger
             Logger logger;
Remember: Logging is
  mission critical.

  Don‘t go without.
We are hiring!
        use it!
    ask questions!
   spread the love!
    send patches!

general@logging.apache.org
Thank you!
 Christian Grobmeier
          @grobmeier
   http://www.grobmeier.de

    Follow me, if you dare!
Image Credits
                   Earth (Nasa)
        Vulcano (Flickr: Martin Barland)
             Tiger (Flickr: TeryKats)
            Gazelle (Flickr: fwooper)
Golden Gate Bridge (Flickr: TimeLapseBlog.com)
        Pens (Flickr: JD | Photography)
           Wineglass (Flickr: Willia4)
          Headache (Flickr: Threephin)
           Pills (Dr. Michael Günther)
        Wheelgear (Flickr: ralphbijker)
          Grapes (Flickr: RVWithTito)
       Chainsaw (Flickr: Dave Hosford)
      Elephant (Flickr: Werner Vermaak)
       Haunted House (Flickr: barb_ar)
         SOS (Flickr: Daquella Manera)
     Bathtime muscles (Flickr: mollypop)
         Yawning Animal (Flickr: robef)
            Mobile (Flickr: twicepix)
          Clouds (Flickr: karindalziel)
             Fight (Flickr: KellBailey)

More Related Content

What's hot

Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
Jeremy Kendall
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
Robert Nyman
 
Asynchronous I/O in PHP
Asynchronous I/O in PHPAsynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
 

What's hot (20)

The Beauty of Java Script
The Beauty of Java ScriptThe Beauty of Java Script
The Beauty of Java Script
 
Persistent mobile JavaScript
Persistent mobile JavaScriptPersistent mobile JavaScript
Persistent mobile JavaScript
 
ES6: The Awesome Parts
ES6: The Awesome PartsES6: The Awesome Parts
ES6: The Awesome Parts
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
 
Express Presentation
Express PresentationExpress Presentation
Express Presentation
 
clara-rules
clara-rulesclara-rules
clara-rules
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
 
Perl: Coro asynchronous
Perl: Coro asynchronous Perl: Coro asynchronous
Perl: Coro asynchronous
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challenger
 
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time MessagingAsynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
Any event intro
Any event introAny event intro
Any event intro
 
Asynchronous Programming FTW! 2 (with AnyEvent)
Asynchronous Programming FTW! 2 (with AnyEvent)Asynchronous Programming FTW! 2 (with AnyEvent)
Asynchronous Programming FTW! 2 (with AnyEvent)
 
Asynchronous I/O in PHP
Asynchronous I/O in PHPAsynchronous I/O in PHP
Asynchronous I/O in PHP
 
Web APIs you (probably) didn't know existed
Web APIs you (probably) didn't know existedWeb APIs you (probably) didn't know existed
Web APIs you (probably) didn't know existed
 
History of jQuery
History of jQueryHistory of jQuery
History of jQuery
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 

Similar to World of Logging

LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
jkumaranc
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
jkumaranc
 

Similar to World of Logging (20)

Java 8 and beyond, a scala story
Java 8 and beyond, a scala storyJava 8 and beyond, a scala story
Java 8 and beyond, a scala story
 
The Ring programming language version 1.5.2 book - Part 10 of 181
The Ring programming language version 1.5.2 book - Part 10 of 181The Ring programming language version 1.5.2 book - Part 10 of 181
The Ring programming language version 1.5.2 book - Part 10 of 181
 
Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.key
 
CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016 CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016
 
Yahoo is open to developers
Yahoo is open to developersYahoo is open to developers
Yahoo is open to developers
 
Quicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of RustQuicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of Rust
 
Knit, Chisel, Hack: Building Programs in Guile Scheme (Strange Loop 2016)
Knit, Chisel, Hack: Building Programs in Guile Scheme (Strange Loop 2016)Knit, Chisel, Hack: Building Programs in Guile Scheme (Strange Loop 2016)
Knit, Chisel, Hack: Building Programs in Guile Scheme (Strange Loop 2016)
 
The Ring programming language version 1.5.4 book - Part 10 of 185
The Ring programming language version 1.5.4 book - Part 10 of 185The Ring programming language version 1.5.4 book - Part 10 of 185
The Ring programming language version 1.5.4 book - Part 10 of 185
 
Go debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFxGo debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFx
 
HashiCorp Vault Plugin Infrastructure
HashiCorp Vault Plugin InfrastructureHashiCorp Vault Plugin Infrastructure
HashiCorp Vault Plugin Infrastructure
 
2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdf2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdf
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM Mechanics
 
Getting modern with logging via log4perl
Getting modern with logging via log4perlGetting modern with logging via log4perl
Getting modern with logging via log4perl
 
The Ring programming language version 1.5.3 book - Part 10 of 184
The Ring programming language version 1.5.3 book - Part 10 of 184The Ring programming language version 1.5.3 book - Part 10 of 184
The Ring programming language version 1.5.3 book - Part 10 of 184
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logs
 
Django at Scale
Django at ScaleDjango at Scale
Django at Scale
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 

More from Christian Grobmeier

More from Christian Grobmeier (6)

The "Why Should You Talk" Talk
The "Why Should You Talk" TalkThe "Why Should You Talk" Talk
The "Why Should You Talk" Talk
 
Zen Programming
Zen ProgrammingZen Programming
Zen Programming
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and Phonegap
 
Dart und JavaScript
Dart und JavaScriptDart und JavaScript
Dart und JavaScript
 
Dart @ JUG Saxony
Dart @ JUG SaxonyDart @ JUG Saxony
Dart @ JUG Saxony
 
Dart != JavaScript
Dart != JavaScriptDart != JavaScript
Dart != JavaScript
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

World of Logging