Log4Net config in external file does not work

前端 未结 13 2018
清歌不尽
清歌不尽 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:23
    1. add following to AssemblyInfo.cs

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

    1. Make sure log4net.config is included in project
    2. In properties of log4net.config

    change Copy to Output Dirctory to Copy if newer

    1. Double check log level level value="ALL"
    0 讨论(0)
提交回复
热议问题