0
WORLD OF LOGGING
Christian Grobmeier         @grobmeier  http://www.grobmeier.de
Why should you log?
T    H    EBIGGESTCHALLENGESWE   H AV Ea
SPEED!
Failsafe. Reliable.
Compability.
Taste.
Loggingwith DukeJava
Too muchtaste...m a k e sheadache!     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...
log4j 2.0      is thefuture  of log4jIntegrates well with:        slf4j      log4j 1.x Commons Logging
What makeslog4j 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());          ...
Better Filter               Marker:Marker SQL_MARKER =  MarkerManager.getMarker("SQL");logger.debug(     SQL_MARKER,     "...
Plugins@Plugin(name = "Sandbox",         type = "Core",         elementType = "appender")public class Mine extends Appende...
Plugins@PluginFactorypublic static Mine create(  @PluginAttr("name") String n,  @PluginElement("filters") Filter f) {  retu...
Configuration<appenders> <Console name="Console"          target="SYSTEM_OUT">   <PatternLayout       pattern="%d{HH:mm} %m...
Configuration{ "configuration":   …   "appenders": {     "Console": {        "name": "STDOUT",        "PatternLayout": { "pa...
Configuration      Reloading<configuration monitorInterval="30">...</configuration>
log4j 1.x              2314 logback             2116log4j 2.x              2386Disabled    5                SPEED!Logging ...
There is  moresweetness
CHAINSAW
The story oflog4php2004 2007 2009 2010
What‘s with...log4netlog4cxx
The story oflog4php      Community
Good times,bad times2000 2009 2010 2011
We need your  HELPCurrently only4 regular codecontributors.
But weFIGHT!6 Releases~750 Commits~600 dev Mailsin 2012 only!
Seriously.Isn‘t logging justBORING?
Well... howdo you log onyour mobile/cloud apps?
With new innovation,new logging challenges      come up. Logging needsinnovation 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 logg...
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) ...
World of Logging
Nächste SlideShare
Wird geladen in ...5
×

World of Logging

2,183

Published on

A talk I gave at the ApacheCon EU 2012. I explained on the Apache Logging project - who are we, what are we doing and what might happen in the future. As log4j 2.0 were currently in beta state, I lost some words on it too.

Published in: Technologie
0 Kommentare
4 Gefällt mir
Statistiken
Notizen
  • Hinterlassen Sie den ersten Kommentar

Keine Downloads
Views
Gesamtviews
2,183
Bei Slideshare
0
Aus Einbettungen
0
Anzahl an Einbettungen
4
Aktionen
Geteilt
0
Downloads
37
Kommentare
0
Gefällt mir
4
Einbettungen 0
No embeds

No notes for slide

Transcript of "World of Logging"

  1. 1. WORLD OF LOGGING
  2. 2. Christian Grobmeier @grobmeier http://www.grobmeier.de
  3. 3. Why should you log?
  4. 4. T H EBIGGESTCHALLENGESWE H AV Ea
  5. 5. SPEED!
  6. 6. Failsafe. Reliable.
  7. 7. Compability.
  8. 8. Taste.
  9. 9. Loggingwith DukeJava
  10. 10. Too muchtaste...m a k e sheadache! Think on: log4j, logback, JUL, TinyLog, AVSL
  11. 11. Pills:slf4j & Commons Logging
  12. 12. Which pill? slf4j log4j 1 logback JUL AVSL log4j 2 Commons Logging Don‘t forget PAX!
  13. 13. log4j 2.0 is thefuture of log4jIntegrates well with: slf4j log4j 1.x Commons Logging
  14. 14. What makeslog4j 2.0 better?
  15. 15. API++ Instead:if(logger.isDebugEnabled()) logger.info("Hi, " + u.getA() + “ “ + u.getB());
  16. 16. API++ Instead:if(logger.isDebugEnabled()) logger.info("Hi, " + u.getA() + “ “ + u.getB()); Write:logger.info("Hi, {} {} ", u.getA(), u.getB());
  17. 17. Better Filter Marker:Marker SQL_MARKER = MarkerManager.getMarker("SQL");logger.debug( SQL_MARKER, "SELECT * FROM {}", table);
  18. 18. 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) { … }
  19. 19. Plugins@PluginFactorypublic static Mine create( @PluginAttr("name") String n, @PluginElement("filters") Filter f) { return new Mine(n, f);}
  20. 20. Configuration<appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="%d{HH:mm} %msg%n"/> </Console></appenders>
  21. 21. Configuration{ "configuration": … "appenders": { "Console": { "name": "STDOUT", "PatternLayout": { "pattern": "%m%n" } }, ...
  22. 22. Configuration Reloading<configuration monitorInterval="30">...</configuration>
  23. 23. log4j 1.x 2314 logback 2116log4j 2.x 2386Disabled 5 SPEED!Logging Performance in ns
  24. 24. There is moresweetness
  25. 25. CHAINSAW
  26. 26. The story oflog4php2004 2007 2009 2010
  27. 27. What‘s with...log4netlog4cxx
  28. 28. The story oflog4php Community
  29. 29. Good times,bad times2000 2009 2010 2011
  30. 30. We need your HELPCurrently only4 regular codecontributors.
  31. 31. But weFIGHT!6 Releases~750 Commits~600 dev Mailsin 2012 only!
  32. 32. Seriously.Isn‘t logging justBORING?
  33. 33. Well... howdo you log onyour mobile/cloud apps?
  34. 34. With new innovation,new logging challenges come up. Logging needsinnovation too.Look at Apache Flume.
  35. 35. Upcoming at the Incubator Guice Components
  36. 36. Instead:Logger logger = Logger.getLogger( „test“);
  37. 37. Instead:Logger logger = Logger.getLogger( „test“); Write: @InjectLogger Logger logger;
  38. 38. Remember: Logging is mission critical. Don‘t go without.
  39. 39. We are hiring! use it! ask questions! spread the love! send patches!general@logging.apache.org
  40. 40. Thank you! Christian Grobmeier @grobmeier http://www.grobmeier.de Follow me, if you dare!
  41. 41. 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)
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×