[jboss-jira] [JBoss JIRA] (JBLOGGING-85) slf4j-jboss-logmanager does not support parametization of a logging statement in the presence of a Throwable

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Fri Sep 20 18:13:03 EDT 2013


    [ https://issues.jboss.org/browse/JBLOGGING-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806225#comment-12806225 ] 

RH Bugzilla Integration commented on JBLOGGING-85:
--------------------------------------------------

James Perkins <jperkins at redhat.com> changed the Status of [bug 876489|https://bugzilla.redhat.com/show_bug.cgi?id=876489] from NEW to ON_QA
                
> slf4j-jboss-logmanager does not support parametization of a logging statement in the presence of a Throwable
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: JBLOGGING-85
>                 URL: https://issues.jboss.org/browse/JBLOGGING-85
>             Project: JBoss Logging
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: slf4j-jboss-logmanager
>            Reporter: Hercules Zeus
>            Assignee: James Perkins
>
> 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()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list