Log4Net FileAppender not thread safe?

有些话、适合烂在心里 提交于 2019-12-18 14:52:36

问题


I need to log to a file because the customer doesn't have a console of something where I can log to with log4net. Now I read that the FileAppender is not thread safe. Is there anyhow a way to log to file within an app that logs out of different threads or what would be a common alternative?


回答1:


Log4Net itself is thread-safe even if FileAppender isn't - the framework manages everything for you. So long as you log in the normal way (rather than directly writing to the appender) you should be fine.



来源:https://stackoverflow.com/questions/1294668/log4net-fileappender-not-thread-safe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!