﻿ 


1.把log4net.config复制到项目中,并修改日志文件位置
2.在Global.cs中添加以下代码
   
   readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     protected void Application_Start()
        {
            ....
            System.IO.FileInfo fileinfo = new System.IO.FileInfo(Server.MapPath("~/App_Data/log4net.Config"));
            log4net.Config.XmlConfigurator.Configure(fileinfo);

            log.Info("网站己启动......");

        }

3.loghelper类
  GetCurrentMethodFullName()方法调用时需要增加所在的命名空间
  DotNet.Web.Framework.Log.GetCurrentMethodFullName()