title: log.info using log.isInfoEnabled
body: <p>We are using SLF4J</p>
  
  <p>Based on a recent discussion in the team </p>
  
  <pre><code>if(LOG.isDebugEnabled()){
    LOG.debug("hello " + a + " world" + b);
  }
  </code></pre>
  
  <p>is better than</p>
  
  <pre><code>LOG.debug("hello {} world {}", a, b);
  </code></pre>
  
  <p>because in the latter case, the String <code>hello {} world {}</code> is created even if "debug" is not enabled. In other words, we are always creating Strings even when it is not required.</p>
  
  <p>I like the latter version as it improves readability significantly.</p>
  
  <p>Can anybody please provide inputs?</p>
  
  <p>Regards,</p>
  
  <p>Shardul.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Let me put it differently. </p>
  
  <p>Which is a better approach OR Which is the most widely accepted approach?</p>
  
  <p>Shardul.</p>