Log4Net/C# - Disable default logging

前端 未结 2 933
庸人自扰
庸人自扰 2021-02-09 04:24

I am using log4net in a C# project, in the production environment, I want to disable all the logging, but when some fatal error occures it should log all the previous 512 messa

2条回答
  •  鱼传尺愫
    2021-02-09 05:07

    Do you still see the messages in Visual Studio if the application is compiled in release mode? It's possible that log4net uses Debug.Write to show the errors anyway. If that's the case then those messages shouldn't appear in release mode.

提交回复
热议问题