Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
阅读 log4net 上的文档,我注意到所有 std Appender 都标记为
“多线程操作不安全”
这听起来好像没有一个 Appender 可以在 ASP.Net 或多线程客户端中使用。
我读错了吗?有没有人遇到线程 log4net Appenders 的问题?
谢谢---克里斯
来自Log4Net 常见问题解答:
log4net 线程安全吗? 是的,log4net 是线程安全的。
log4net 线程安全吗?
是的,log4net 是线程安全的。
我在许多 ASP.NET 应用程序中使用了 log4net,在获取记录器时没有任何问题:
private static readonly ILog log = LogManager.GetLogger(typeof(MyLogger));