log4net only works when XmlConfigurator.Configure() is called

前端 未结 2 885
攒了一身酷
攒了一身酷 2020-12-03 10:19

I understand that this question has been asked several times, but unfortunately, I haven\'t been able to get my logging configuration working. I have to be making some very

2条回答
  •  我在风中等你
    2020-12-03 11:19

    You do not need to call the XmlConfigurator manually if you use:

    [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log.config", Watch = true)]
    

    However you have to add the tag to all your dlls (all assambly.cs files).

提交回复
热议问题