private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);Quick and Dirty Guide to Configuring Log4Net For Web Applications
My code:
private static readonly ILog Log { get; set; }
static ClassConstructor()
{
Log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(HttpContext.Current.Server.MapPath("~/log4net.config")));
}