asp.netwcfiislog4netthreadcontext

Is Log4net threadContext safe to use with WCF hosted in IIS?


I've read in a few places that the log4net threadContext isn't safe to use in an asp.net scenario. Here are a few articles:

Log4Net, ThreadContext, and Global.asax
http://piers7.blogspot.com/2005/12/log4net-context-problems-with-aspnet.html

So my scenario is I want to use the threadContext in a WCF layer hosted within IIS. Is the threadcontext going to be ok? I'm thinking the concurrency mode of "single" would make this ok.


Solution

  • As Log4net is thread safe I would not expect a problem.