log4net失效

网站项目,log4net失效了。具体原因不详。

最终在需要写日志的页面加上这个就可以了。

[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Web.config", Watch = true)] 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Text;
using System.Web.Script.Serialization;
using COM.JRJ.AP.Model;
using COM.JRJ.AP.BLL.Action;
using System.Text.RegularExpressions;


using log4net;
[assembly: log4net.Config.XmlConfigurator(ConfigFile 
= "Web.config", Watch = true)]


原文地址:https://www.cnblogs.com/tenghoo/p/1707213.html