I\'m getting an error on a program that has log4net configured, but no log file is being created. I\'m certain the logging is set up in the program because other users have
Give the following code in your application before you put your logging code:
log4net.Config.XmlConfigurator.Configure();
You can define it in Global.asax:
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
// Initialize log4net.
log4net.Config.XmlConfigurator.Configure();
}
You can also add the following line as Kevin advised (either mentioning your config file name or not):
[assembly: log4net.Config.XmlConfigurator]
or
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Web.config", Watch = true)]
Hope it helps!!!