log4日志配置01
1.添加引用
log4net、Log4Net.Async
2.添加配置文件(详见下一篇log4日志配置02)
Log4Net.config
3.设置配置文件位置
AssemblyInfo->[assembly: log4net.Config.XmlConfigurator(ConfigFile = "conf/Log4Net.config", Watch = true)]
4.日志调用
private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
logger.Info("开始日志记录");