周公这篇已经写了很详细了:http://blog.youkuaiyun.com/zhoufoxcn/article/details/6029021
周公的是写在web.config里面,我的是重新写一个配置文件log4net.config
网站配置:
void Application_Start(object sender, EventArgs e)
{
//在应用程序启动时运行的代码
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(Server.MapPath("log4net.config")));
}
项目配置:
protected void Application_Start(object sender, EventArgs e)
{
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("log4net.config"));
}
本文详细介绍了如何在ASP.NET应用中配置log4net日志记录系统,包括应用程序级和项目级的配置方法。
1197

被折叠的 条评论
为什么被折叠?



