
如何设置特定于ASP.NET请求的log4net上下文属性?
我一直在使用log4net来记录我们的ASP.NET网站的日志消息,最近我想添加有关发生错误的页面/处理程序的信息.因此,我决定将以下行添加到Global.asax中: void Application_BeginRequest(object sender, EventArgs e){ log4net.ThreadContext.Properties[page] =
我一直在使用log4net来记录我们的ASP.NET网站的日志消息,最近我想添加有关发生错误的页面/处理程序的信息.因此,我决定将以下行添加到Global.asax中: void Application_BeginRequest(object sender, EventArgs e){ log4net.ThreadContext.Properties[page] =