Is it safe for Log4net threadContext to use with WCF in IIS?

I read in several places that log4net threadContext is unsafe for use in asp.net scripts. Here are some articles:

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

So, in my script, I want to use threadContext in a WCF layer hosted in IIS. Is threadcontext okay? I think the concurrency mode "single" would do this normally.

+3
source share
3 answers

Since Log4net is thread safe, I would not expect a problem.

+1

log4net , ​​ asp.net wcf. . , log4net threadcontext. , .

0

WCF, IIS6, log4net , concurrency. threadContext .

The only caveat is that if you load the log4net parameter from an external file into the WCF layer, you may need to restart it in IIS to get the changes.

0
source

Source: https://habr.com/ru/post/1730601/


All Articles