You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2016/04/15 02:33:25 UTC

[jira] [Created] (LOG4J2-1368) Status logger drops/ignores exception

Remko Popma created LOG4J2-1368:
-----------------------------------

             Summary: Status logger drops/ignores exception
                 Key: LOG4J2-1368
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1368
             Project: Log4j 2
          Issue Type: Bug
          Components: API
    Affects Versions: 2.5
            Reporter: Remko Popma


Internal log4j logging like this:
{code}
StatusLogger.getLogger().warn("error occurred during {}", "some process", exception);
{code}

This will just log the message but will not report the specified exception.

There is a bug in ParameterizedNoReferenceMessageFactory (the factory used by StatusLogger):

{code}
final String formatted = new ParameterizedMessage(message, params).getFormattedMessage();
return new SimpleMessage(formatted); // exception is dropped
{code}






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org