<div dir="ltr">Hello,<div><br></div><div>I have noticed an inconsistency in behavior of the following logging code:</div><div><br></div><div><div><font face="monospace, monospace">    final Throwable t = new RuntimeException("some runtime exception");</font></div><div><font face="monospace, monospace">    LOGGER.info("{} {} {}", new Object[] { "abc", "def", t });</font></div><div><font face="monospace, monospace">    LOGGER.info("{} {}", "abc", t);</font></div><div><font face="monospace, monospace">    LOGGER.info("{}", (Object) t);</font></div></div><div><br></div><div>In SLF4J versions 1.7.14 and earlier (tested 1.7.14, 1.7.13, 1.7.10, 1.7.7, 1.7.0, and 1.6.0), the result using the "simple" backend is:</div><div><br></div><div><div><font face="monospace, monospace">[main] INFO test.Main - abc def java.lang.RuntimeException: some runtime exception</font></div><div><font face="monospace, monospace">[main] INFO test.Main - abc java.lang.RuntimeException: some runtime exception</font></div><div><font face="monospace, monospace">[main] INFO test.Main - java.lang.RuntimeException: some runtime exception</font></div></div><div><br></div><div>In SLF4J versions 1.7.15 and newer (tested 1.7.15 and 1.7.25), the result is:</div><div><br></div><div><div><font face="monospace, monospace">[main] INFO test.Main - abc def {}</font></div><div><font face="monospace, monospace">java.lang.RuntimeException: some runtime exception</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>at test.Main.main(Main.java:10)</font></div><div><font face="monospace, monospace">[main] INFO test.Main - abc {}</font></div><div><font face="monospace, monospace">java.lang.RuntimeException: some runtime exception</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>at test.Main.main(Main.java:10)</font></div><div><font face="monospace, monospace">[main] INFO test.Main - java.lang.RuntimeException: some runtime exception</font></div></div><div><br></div><div><br></div><div>To me, the new behavior is unexpected, and it is inconsistent with the logging variant taking exactly one parameter because although the Throwable instance is the last parameter, the one and only formatting anchor in the format string is replaced by the toString() result and the stack trace is not logged.</div><div><br></div><div>Is this a bug?</div><div><br></div><div>Daniel Trebbien</div></div>