[prev in list] [next in list] [prev in thread] [next in thread]
List: log4net-dev
Subject: [jira] [Updated] (LOG4NET-469) Fixes for the LogicalThreadContext - NDC stack is wrong
From: "Maxim Cherednik (JIRA)" <jira () apache ! org>
Date: 2015-07-30 9:02:04
Message-ID: JIRA.12850197.1438246560000.328549.1438246924593 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/LOG4NET-469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Maxim Cherednik updated LOG4NET-469:
------------------------------------
Fix Version/s: 1.3.0
> Fixes for the LogicalThreadContext - NDC stack is wrong
> -------------------------------------------------------
>
> Key: LOG4NET-469
> URL: https://issues.apache.org/jira/browse/LOG4NET-469
> Project: Log4net
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.0
> Reporter: Maxim Cherednik
> Fix For: 1.3.0
>
>
> This is related to issue number 455. (Link to github: \
> https://github.com/apache/log4net/pull/12) I was playing around with this fix \
> recently and came across some strange behavior. Imagine main method:
> {code:title=main.cs|borderStyle=solid}
> using (LogicalThreadContext.Stacks["NDC"].Push("Start"))
> {
> // init all the stuff here
> _timer.TimerElapsed += TimerOnTimerElapsed;
> }
> {code}
> An that would be it.
> When I am on the timer tick event I have another context:
> {code:title=timer.cs|borderStyle=solid}
> using (LogicalThreadContext.Stacks["NDC"].Push("timer"))
> {
> Logger.Info("I am doing something here. Show me the context");
> }
> {code}
> As a result expect to see the context of the timer like this: "timer",
> instead, I see: "Start timer"
> Is this correct behavior?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic