Want more features on Pastebin? Sign Up, it's FREE!
Guest

What's Up with Logging in Java

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.24 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. logger.debug("The entry is {}.", entry);
  2. //which expands effectively to
  3. if (logger.isDebugEnabled()){
  4.     // Note that it's actually *more* efficient than this - see Huxi's comment below...
  5.     logger.debug("The entry is " + entry + ".");
  6. }
clone this paste RAW Paste Data