How do I configure log4net so that log.IsDebugEnabled is true?

后端 未结 6 495
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 02:51

I am trying to use log4net in an ASP.NET application with Visual Studio 2005. I have declared an instance of the logger like so:

Private Shared ReadOnly log          


        
6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 03:33

    Use this in any method before you use log :

    log4net.Config.XmlConfigurator.Configure();

    In App.Config ,the settings should be :

    
          
          
        
    

提交回复
热议问题