How to track down log4net problems

后端 未结 6 1899
生来不讨喜
生来不讨喜 2020-11-22 05:19

I use log4net all the time, but one thing I\'ve never figured out is how to tell what\'s going on on the inside. For example, I\'ve got a console appender and a database app

6条回答
  •  情深已故
    2020-11-22 05:45

    In addition to the above answer, you can use this line to see the log in realtime instead of the c:\tmp\log4net.txt output.

    log4net.Util.LogLog.InternalDebugging = true;
    

    For example, in a console app, you can add this and then watch the output in realtime. It's good for debugging log4net in a small test harness to see what's happening with the appender you're testing.

提交回复
热议问题