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
Yes, do it like Anson said. Also, if you are calling Configure in a class library you can do that by adding an attribute to your class:
[assembly: XmlConfigurator(Watch = true)]
and if you're using log4net.config
file, use it like that instead:
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]