Changes between Version 25 and Version 26 of ProgrammingGuidelines


Ignore:
Timestamp:
07/12/11 15:43:45 (8 years ago)
Author:
welberge
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProgrammingGuidelines

    v25 v26  
    3636The level of a log message is selected by the function of the Logger that is 
    3737used for logging (e.g. logger.debug("message"), logger.error("error")). 
     38 
     39== Parameterized logging == 
     40SLF4J's parameterized logging is a printf-like logging style: 
     41{{{ 
     42LOGGER.debug("Hello {}", name); 
     43}}} 
     44This avoids the unnecessary performance overhead of string concatenation  
     45{{{ 
     46LOGGER.debug("Hello "+name); 
     47}}} 
     48or code bloat 
     49{{{ 
     50if (logger.isDebugEnabled())  
     51{ 
     52      LOGGER.debug("Hello " + name); 
     53} 
     54}}} 
     55 
     56 
    3857[[ViewTopic()]] 
    3958!^[[ElckerlycDocumentation]]