title: How to log exception and message with placeholders with SLF4J
body: <p>What's the correct approach to log both an error message and an exception using <a href="http://www.slf4j.org/" rel="noreferrer">SLF4J</a>?</p>
  
  <p>I've tried doing this but the exception stack trace is never printed:</p>
  
  <p><code>logger.error("Unable to parse data {}", inputMessage, e);</code></p>
  
  <p>In this case I want to populate <code>{}</code> with the <code>inputMessage</code> as well as logging out the exception stacktrace.</p>
  
  <p>The only way I can see to do this would be to do this:</p>
  
  <p><code>logger.error("Unable to parse data " + inputMessage, e);</code></p>
  
  <p>which is not pretty.</p>