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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to