Log4Net config in external file does not work

前端 未结 13 2109
清歌不尽
清歌不尽 2020-11-30 20:27

We are using log4net and want to specify it\'s configuration in an external config file (as we have done with other sections). To do this we have changed the log4net section

13条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 21:05

    I had the same problem, besides having

    [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net")]
    

    in the running project, I also had the following line in a reference project:

    [assembly: log4net.Config.XmlConfigurator]
    

    When I removed this line in the referenced projects, the logs start to appear.

提交回复
热议问题