title: Using throwable along with parameters in log4j 2
body: <p>I want to log an error(with log4j 2) with some dynamic parameters that will provide better understanding what went wrong and I faced the problem that there is no method like:</p>
  
  <pre><code>void error(String message, Throwable t);
  </code></pre>
  
  <p>with parameters support. </p>
  
  <p>In my code I want both exception and the parameters to fill {} in the message:</p>
  
  <pre><code>    try {
          //...
      } catch (Exception e) {
          LOGGER.error("Error removing data for account {}", accountId, e);
      }
  </code></pre>
  
  <p>Is there a better way to implement it rather than using it like this?</p>
  
  <pre><code>LOGGER.error("Error removing token for account " + accountId, e);
  </code></pre>