Log4net LogicalThreadContext not working as expected

前端 未结 2 1804
说谎
说谎 2020-12-17 19:44

I\'ve been trying to use Log4nets LogicalThreadContext to provide context to each of my log entries. My application uses async/await quite heavily, but from reading various

2条回答
  •  醉梦人生
    2020-12-17 19:53

    I just ran into this on one of our projects. This should fix it: https://github.com/apache/log4net/pull/12.

    The code basically obeys to the shallow-copy-on-write and immutable rules described by @StephenCleary and the accompanied test case withstands the Task.WhenAll scenario.

提交回复
热议问题