Description of problem: http://www.slf4j.org/faq.html#paramException describes that from slf4j 1.6 onwards doing the following will print a stacktrace: logger.error("Failed to format {}", s, e); However, due to the implementation of org.slf4j.impl.MessageFormatter in slf4j-jboss-logmanager, when logger.error(String, Object, Object) is called, even if the third parameter is a Throwable, it is not recognised as such. Investigating further, it seems that org.slf4j.impl.MessageFormatter is probably just an old copy of org.slf4j.helpers.MessageFormatter in slfj-api 1.6.1, where most formatting methods used to return a String now returns a FormattingTuple. This issue can be fixed by making all calls in Slf4Logger to org.slf4j.impl.MessageFormatter to call org.slf4j.helpers.MessageFormatter instead and appropriately call ExtLogRecord.setThrown(formattingTuple.getThrowable()). Version-Release number of selected component (if applicable): How reproducible: 100 % Steps to Reproduce: try { throw new RuntimeException("bla bla"); } catch (RuntimeException e) { logger.error("Text: {}", "mytext", e); } Actual results: No stacktrace is printed, not even e.getMessage(). It is completely ignored. Expected results: Stacktrace is printed.
James Perkins <jperkins> updated the status of jira JBLOGGING-85 to Resolved
James Perkins <jperkins> made a comment on jira JBLOGGING-85 Pull request merged.
This actually looks like it was done on 6.1.1.ER1 with an upgrade to the slf4j-jboss-logmanager. Commit was https://github.com/jbossas/jboss-eap/commit/872fd1c8056062ac233421bd64c4db50ca74cae2
Verified on EAP 6.2.0.ER4