Log4Net config in external file does not work

前端 未结 13 2099
清歌不尽
清歌不尽 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:18

    There is an open defect on this issue. Log4Net does not support the configSource attribute of configuration elements. To use a purely configuration file solution you use the log4net.Config key in appSettings.

    Step 1: Include the normal configuration section definition:

    
        

    Step 2: Use the magic log4net.Config key in appSettings.

    
          
    
    

    Step 3: Contribute a patch to fix the handling of configSource.

提交回复
热议问题