Enable file logging for log4net from code instead of from configuration

前端 未结 3 1742
误落风尘
误落风尘 2020-12-01 11:12

Why in the world does the following test fail? (its in xunit) I\'ve tried it with different appenders and it never writes anything though the log seems like it is ready to

3条回答
  •  甜味超标
    2020-12-01 11:28

    Just throwing a guess out there...

    Do you have the XmlConfiguration defined in your assembly?

    Did you forget it in your test project?

    [assembly: log4net.Config.XmlConfigurator(Watch = true)]
    

    That usually burns me every once in a while.

提交回复
热议问题