logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Ståldal (JIRA) <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1452) Reusable messages break flow tracing logic
Date Thu, 30 Jun 2016 08:30:10 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15356735#comment-15356735
] 

Mikael Ståldal commented on LOG4J2-1452:
----------------------------------------

Removing test since it was not well received.

> 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


Mime
View raw message