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

后端 未结 6 477
伪装坚强ぢ
伪装坚强ぢ 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:31

    Before calling LogManager.GetLogger("")

    You have to call log4net.Config.XmlConfigurator.Configure(); In an ASP.NET app you probably want to put this call in Application_Start

提交回复
热议问题