[
https://issues.apache.org/jira/browse/LOG4J2-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357463#comment-15357463
]
Remko Popma commented on LOG4J2-1452:
-------------------------------------
Thanks for confirming!
> Reusable messages break flow tracing logic
> ------------------------------------------
>
> Key: LOG4J2-1452
> URL: https://issues.apache.org/jira/browse/LOG4J2-1452
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.6, 2.6.1
> Reporter: Mikael Ståldal
> Assignee: Remko Popma
> Fix For: 2.6.2
>
>
> Flow tracing assumes that you can save an instance of {{EntryMessage}} across
> a method, but if you log something else within that method and reusable
> messages are in effect (as they are by default since 2.6), this does not
> always work properly.
> This code illustrate the issue:
> {code}
> EntryMessage entryMessage =
> logger.traceEntry(logger.getMessageFactory().newMessage("the entry"));
> logger.info("something else");
> logger.traceExit(entryMessage);
> {code}
> It works as expected if you remove the middle {{logger.info()}}, but with it
> the exit message gets messed up.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]