Re: ThreadLogicalContext not actually following logical threads

2011-12-11 Thread Andrew Arnott
Thanks for fixing this, Stefan. I haven't looked at your checkin itself (r1207948 apparently), but just a heads up, that unless you're using an immutable stack, you may want to verify that the stack doesn't corrupt itself from threads with different contexts modifying the same object. I'm not sur

Re: ThreadLogicalContext not actually following logical threads

2011-11-29 Thread Stefan Bodewig
On 2011-11-29, Andrew Arnott wrote: > I'd be happy to help. But given the fact that I'm a Microsoft employee > with some strict open source restrictions, I can only provide support for > it. OK, understood. And thank you for your support. > In short, if log4net stores its logical call-tracking

Re: ThreadLogicalContext not actually following logical threads

2011-11-29 Thread Andrew Arnott
I'd be happy to help. But given the fact that I'm a Microsoft employee with some strict open source restrictions, I can only provide support for it. In short, if log4net stores its logical call-tracking context stack using CallContext.LogicalSetData and retrieves it using the similarly named meth

Re: ThreadLogicalContext not actually following logical threads

2011-11-28 Thread Stefan Bodewig
On 2011-11-28, Andrew Arnott wrote: > The documentation is poor, I agree. I had to stumble around quite a bit > before I figured out how to use it properly myself. I believe the > difference may be that CallContext.*Logical*SetData requires the value to > be serializable, so that it can be clone

Re: ThreadLogicalContext not actually following logical threads

2011-11-28 Thread Andrew Arnott
The documentation is poor, I agree. I had to stumble around quite a bit before I figured out how to use it properly myself. I believe the difference may be that CallContext.*Logical*SetData requires the value to be serializable, so that it can be cloned and applied to other threads, perhaps even

Re: ThreadLogicalContext not actually following logical threads

2011-11-28 Thread Stefan Bodewig
On 2011-11-27, Andrew Arnott wrote: > I am successfully using CallContext.LogicalSetData myself for other logical > thread tracking purposes in my application so I have reason to believe it > works -- I just don't know why log4net isn't working. Any ideas? LogicalThreadContext uses SetData rathe

ThreadLogicalContext not actually following logical threads

2011-11-27 Thread Andrew Arnott
I'm trying to use log4net.LogicalThreadContext.Stacks[stackName].Push(value) to push context onto the logical thread. But I can see that ThreadPool.QueueUserWorkItem, and other ways that the .NET CallContext is propagated do not actually receive the log4net.LogicalThreadContext, and as a result th