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/09/18 10:38:20 UTC

[jira] [Reopened] (LOG4J2-1452) Reusable messages break flow tracing logic

     [ https://issues.apache.org/jira/browse/LOG4J2-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remko Popma reopened LOG4J2-1452:
---------------------------------

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