首先,我们要在Common类库中引用log4net.dll ExtLogImpl.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using log4net.Core; namespace log4net.Ext { public class ExtLogImpl : LogImpl, IExtLog { /// <summary> /// The fully qu…
main using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using log4net; using log4net.Config; using System.IO; using Quartz; using Quartz.Impl; namespace Demolog4net { class Program { st…
原因:项目在DEBUG编译下日志是好好的,但是生成了Realse布署后却无日志产生了. 查找: 官方指导:http://logging.apache.org/log4net/release/faq.html log4net doesn't log when built in RELEASE mode If you use attributes to configure log4net then the order by which assemblies are loaded may determ…
using log4net; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Web; namespace TryLittle.Helper { public static class Log { public static void Debug(object message) { LogManager.GetLogger(GetCu…