摘要:4配置Global.asax<%@ Application Language="C#" %><script runat="server"> void Application_Start(object sender, EventArgs e) { //在应用程序启动时运行的代码 //初始化日志使用封装类 AppLog.Init(); AppLog.Write("Web站点运...
阅读全文
摘要:3在web.config中添加如下XML,并在网站的根目录新建MyProject_Log文件夹(日志文件所在的文件夹)<configSections><!--注册lognet--><section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>&l...
阅读全文
摘要:1下载log4net2在web下的app_code文件夹中添加App.css类using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using S...
阅读全文
摘要:<?xmlversion="1.0"encoding="utf-8"?><configuration><configSections><sectionname="log4net"type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/></configSections&g...
阅读全文