title: Log4j2: How to print all object parameters in log
body: <p>I would like to print all objects arguments as part of log message in Log4J2. For instance if I call</p>
  
  <pre><code>logger.info("Hello World 3", true, false, "'3 object params means we invoke ... method'");
  </code></pre>
  
  <p>The result is that only the following is logged</p>
  
  <blockquote>
    <p>Hello World 3</p>
  </blockquote>
  
  <p>I would like something like</p>
  
  <blockquote>
    <p>Hello World 3 true false '3 object params means we invoke ... method'</p>
  </blockquote>
  
  <p>I can do this</p>
  
  <pre><code>logger.info("Hello World 3 {} {} {}", true, false, "'3 object params means we invoke ... method'");
  </code></pre>
  
  <p>But then I have to remember to add the correct number of {}. Also I have refactored code using regexp from other log-framework, so I have lots of statements looking like the first with object parameters but not {}. </p>
  
  <p>It is possible to change the message adding a * or []? I have not been able to find this in Log4j2 documentation <a href="https://logging.apache.org/log4j/2.0/manual/messages.html" rel="nofollow">Messages</a> or <a href="https://logging.apache.org/log4j/2.0/manual/layouts.html#PatternLayout" rel="nofollow">Layout Patterns</a></p>