Log4Net config in external file does not work

前端 未结 13 2096
清歌不尽
清歌不尽 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条回答
  •  -上瘾入骨i
    2020-11-30 21:10

    @Mitch, It turns out there is a file with the [assembly:...] declaration, but it did not have the ConfigFile property.

    Once I added it and pointed it to Log.config, it started working. I would have thought that it would work like all the other config sections (ie AppSettings) and accept external config files with no modification.

    We don't have the second statement you mentioned, as we wrap it in a global static log provider.

提交回复
热议问题