logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maxcherednik <...@git.apache.org>
Subject [GitHub] log4net pull request: Fixes for the LogicalThreadContext
Date Mon, 27 Jul 2015 12:44:56 GMT
Github user maxcherednik commented on the pull request:

    I was playing around with this fix recently and came across some strange behavior.
    Imagine main method:
        using (LogicalThreadContext.Stacks["NDC"].Push("Start"))
            // init all the stuff here
            _timer.TimerElapsed += TimerOnTimerElapsed;
    An that would be it.
    Then I on the timer tick event I have another context:
        using (LogicalThreadContext.Stacks["NDC"].Push("timer"))
            Logger.Info("I am doing something here. Show me the context");
    As a result expect to see the context of the timer like this: "timer", 
    instead, I see: "Start timer"
    Is this correct behavior?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message