Changes between Version 26 and Version 27 of ProgrammingGuidelines


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

--

Legend:

Unmodified
Added
Removed
Modified
  • ProgrammingGuidelines

    v26 v27  
    5353} 
    5454}}} 
    55  
     55if the log statement is '''not''' executed. If three or more parameters are 
     56needed, the log statement has to be called with an Object array. For example: 
     57{{{ 
     58LOGGER.debug("Hello {} {} and {}", new Object[]{name1,name2,name3}); 
     59}}} 
     60The {{{logger.isDebugEnabled()}}} version is still recommended if some 
     61expensive operation is needed to create the log String: 
     62{{{ 
     63if (logger.isDebugEnabled()) { 
     64      
     65      LOGGER.debug("Expensive result: {}", getExpensiveResult()); 
     66} 
     67}}} 
    5668 
    5769[[ViewTopic()]]