Log4net logging is not working with parallel threads

前端 未结 1 1763
野趣味
野趣味 2021-01-28 18:57

I am using basic Parallel.Foreach loop on Random numbers to log number itself using log4net.

Here is my code to log 5000 messages on parallel threads

            


        
相关标签:
1条回答
  • 2021-01-28 19:25

    You are writing to the GlobalContext, I guess you need to write to the ThreadLogicalContext instead to get it working the way you want.

    0 讨论(0)
提交回复
热议问题