/// <summary> /// 添加Log4Net日志记录器 /// </summary> /// <param name="factory">日志工厂</param> /// <param name="repositoryName">仓储名称</param> /// <param name="configFile">配置文件</param> public static ILoggerFactory AddLog4Net(this ILoggerFactory factory, string repositoryName, string configFile) { factory.AddProvider(new Log4NetLoggerProvider()); Log4NetLogger.InitRepository(repositoryName, configFile); return(factory); }