|  | @@ -31,7 +31,7 @@ namespace Logs
 | 
	
		
			
				|  |  |              if (type.SubLogNames.ContainsKey(flagKey))
 | 
	
		
			
				|  |  |                  return LogManager.GetLogger(LoggerRepository.Name, type.SubLogNames[flagKey]);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            var defaultKey = string.Empty;
 | 
	
		
			
				|  |  | +            string defaultKey = string.Empty;
 | 
	
		
			
				|  |  |              foreach (var key in type.SubLogNames.Keys)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  defaultKey = key;
 | 
	
	
		
			
				|  | @@ -57,7 +57,7 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="type">日志类型</param>
 | 
	
		
			
				|  |  |          /// <param name="message">消息</param>
 | 
	
		
			
				|  |  |          /// <param name="flagKey">日志子项索引Key</param>
 | 
	
		
			
				|  |  | -        public static void Info(this ILogType type, string message, string flagKey) => type.Info(message, null!, flagKey);
 | 
	
		
			
				|  |  | +        public static void Info(this ILogType type, string message, string flagKey) => type.Info(message, null, flagKey);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  |          /// 运行记录
 | 
	
	
		
			
				|  | @@ -65,7 +65,7 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="type">日志类型</param>
 | 
	
		
			
				|  |  |          /// <param name="ex">异常</param>
 | 
	
		
			
				|  |  |          /// <param name="flagKey">日志子项索引Key</param>
 | 
	
		
			
				|  |  | -        public static void Info(this ILogType type, Exception ex, string flagKey) => type.Info(null!, ex, flagKey);
 | 
	
		
			
				|  |  | +        public static void Info(this ILogType type, Exception ex, string flagKey) => type.Info(null, ex, flagKey);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          #endregion Info
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -94,7 +94,7 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="type">日志类型</param>
 | 
	
		
			
				|  |  |          /// <param name="ex">异常</param>
 | 
	
		
			
				|  |  |          /// <param name="flagKey">日志子项索引Key</param>
 | 
	
		
			
				|  |  | -        public static void Error(this ILogType type, Exception ex, string flagKey) => type.Error(null!, ex, flagKey);
 | 
	
		
			
				|  |  | +        public static void Error(this ILogType type, Exception ex, string flagKey) => type.Error(null, ex, flagKey);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          #endregion Error
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -115,7 +115,7 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="type">日志类型</param>
 | 
	
		
			
				|  |  |          /// <param name="message">消息</param>
 | 
	
		
			
				|  |  |          /// <param name="flagKey">日志子项索引Key</param>
 | 
	
		
			
				|  |  | -        public static void Warn(this ILogType type, string message, string flagKey) => type.Warn(message, null!, flagKey);
 | 
	
		
			
				|  |  | +        public static void Warn(this ILogType type, string message, string flagKey) => type.Warn(message, null, flagKey);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  |          /// 警告
 | 
	
	
		
			
				|  | @@ -123,7 +123,7 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="type">日志类型</param>
 | 
	
		
			
				|  |  |          /// <param name="ex">异常</param>
 | 
	
		
			
				|  |  |          /// <param name="flagKey">日志子项索引Key</param>
 | 
	
		
			
				|  |  | -        public static void Warn(this ILogType type, Exception ex, string flagKey) => type.Warn(null!, ex, flagKey);
 | 
	
		
			
				|  |  | +        public static void Warn(this ILogType type, Exception ex, string flagKey) => type.Warn(null, ex, flagKey);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          #endregion Warn
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -141,7 +141,7 @@ namespace Logs
 | 
	
		
			
				|  |  |                  return $"[Type:{ex.GetType().Name}][StackTrace:{ex.StackTrace}][Message:{ex.Message.Replace("\r\n", " ")}]";
 | 
	
		
			
				|  |  |              if (!string.IsNullOrEmpty(message) && ex == null)
 | 
	
		
			
				|  |  |                  return message;
 | 
	
		
			
				|  |  | -            return $"[Message:{message}][Type:{ex!.GetType().Name}][StackTrace:{ex.StackTrace}][Ex Message:{ex.Message.Replace("\r\n", " ")}]";
 | 
	
		
			
				|  |  | +            return $"[Message:{message}][Type:{ex.GetType().Name}][StackTrace:{ex.StackTrace}][Ex Message:{ex.Message.Replace("\r\n", " ")}]";
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          #endregion 写入日志
 | 
	
	
		
			
				|  | @@ -151,25 +151,25 @@ namespace Logs
 | 
	
		
			
				|  |  |          private static string? _configPath = "Log";
 | 
	
		
			
				|  |  |          private static int _fileSize = 500;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        private static readonly List<ILogType> InitList = new List<ILogType>();
 | 
	
		
			
				|  |  | +        private static readonly List<ILogType> _initList = new List<ILogType>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        private static readonly LogConfig ConfigModel = new LogConfig();
 | 
	
		
			
				|  |  | +        private static readonly LogConfig _configModel = new LogConfig();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          private static bool _cleanSet = false;
 | 
	
		
			
				|  |  |          private static string _previousCleanDay = null;
 | 
	
		
			
				|  |  |          private static int _cleanDays = 30;
 | 
	
		
			
				|  |  | -        private static Timer? _logCleanTimer;
 | 
	
		
			
				|  |  | +        private static Timer _logCleanTimer;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  |          /// 设置配置信息
 | 
	
		
			
				|  |  |          /// </summary>
 | 
	
		
			
				|  |  | -        /// <param name="logConfig">配置信息</param>
 | 
	
		
			
				|  |  | +        /// <param name="logConfigs">配置信息</param>
 | 
	
		
			
				|  |  |          public static void SetConfigInfo(LogConfig logConfig)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              SetConfigPath(logConfig.LogPath);
 | 
	
		
			
				|  |  |              SetLogFileSize(logConfig.LogSize);
 | 
	
		
			
				|  |  |              SetLogCleanDays(logConfig.LogDays);
 | 
	
		
			
				|  |  | -            SetConfigInfo(logConfig.Logs!);
 | 
	
		
			
				|  |  | +            SetConfigInfo(logConfig.Logs);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
	
		
			
				|  | @@ -187,7 +187,7 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="logConfigs">配置信息</param>
 | 
	
		
			
				|  |  |          public static void SetConfigInfo(List<LogConfigModel> logConfigs)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            ConfigModel.Logs = logConfigs;
 | 
	
		
			
				|  |  | +            _configModel.Logs = logConfigs;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
	
		
			
				|  | @@ -218,21 +218,21 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="types">日志类型数组</param>
 | 
	
		
			
				|  |  |          public static void Init(params ILogType[] types)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            var addedTypes = types.Where(p => !InitList.Contains(p)).ToList();
 | 
	
		
			
				|  |  | +            var addedTypes = types.Where(p => !_initList.Contains(p)).ToList();
 | 
	
		
			
				|  |  |              if (addedTypes.Count == 0)
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  | -            if (ConfigModel.Logs == null || ConfigModel.Logs.Count == 0)
 | 
	
		
			
				|  |  | +            if (_configModel.Logs == null || _configModel.Logs.Count == 0)
 | 
	
		
			
				|  |  |                  throw new Exception("Log init, config is null.");
 | 
	
		
			
				|  |  | -            _configPath = ConfigModel.Logs.FirstOrDefault(p => !string.IsNullOrEmpty(p.FileName))!.FileName;
 | 
	
		
			
				|  |  | -            var xmlDoc = new XmlDocument();
 | 
	
		
			
				|  |  | +            _configPath = _configModel.Logs.FirstOrDefault(p => !string.IsNullOrEmpty(p.FileName)).FileName;
 | 
	
		
			
				|  |  | +            XmlDocument xmlDoc = new XmlDocument();
 | 
	
		
			
				|  |  |              xmlDoc.AppendChild(xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", null));
 | 
	
		
			
				|  |  | -            var configuration = xmlDoc.CreateElement("configuration");
 | 
	
		
			
				|  |  | -            var root = xmlDoc.CreateElement("log4net");
 | 
	
		
			
				|  |  | +            XmlElement configuration = xmlDoc.CreateElement("configuration");
 | 
	
		
			
				|  |  | +            XmlElement root = xmlDoc.CreateElement("log4net");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              foreach (var item in addedTypes)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                InitList.Add(item);
 | 
	
		
			
				|  |  | -                var config = ConfigModel.Logs.FirstOrDefault(p => p.Name == item.LogName);
 | 
	
		
			
				|  |  | +                _initList.Add(item);
 | 
	
		
			
				|  |  | +                LogConfigModel config = _configModel.Logs.FirstOrDefault(p => p.Name == item.LogName);
 | 
	
		
			
				|  |  |                  if (config is null)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      config = new LogConfigModel
 | 
	
	
		
			
				|  | @@ -244,14 +244,19 @@ namespace Logs
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  else
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    config.SubLogNames ??= new Dictionary<string, string>();
 | 
	
		
			
				|  |  | +                    if (config.SubLogNames is null)
 | 
	
		
			
				|  |  | +                        config.SubLogNames = new Dictionary<string, string>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                    foreach (var key in config.SubLogNames.Keys.Where(key => item.SubLogNames != null && !item.SubLogNames.ContainsKey(key)))
 | 
	
		
			
				|  |  | +                    foreach (var key in config.SubLogNames.Keys)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  | +                        if (item.SubLogNames != null && item.SubLogNames.ContainsKey(key))
 | 
	
		
			
				|  |  | +                            continue;
 | 
	
		
			
				|  |  |                          item.SubLogNames?.Add(key, config.SubLogNames[key]);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | -                    foreach (var key in item.SubLogNames!.Keys.Where(key => !config.SubLogNames.ContainsKey(key)))
 | 
	
		
			
				|  |  | +                    foreach (var key in item.SubLogNames.Keys)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  | +                        if (config.SubLogNames.ContainsKey(key))
 | 
	
		
			
				|  |  | +                            continue;
 | 
	
		
			
				|  |  |                          config.SubLogNames.Add(key, item.SubLogNames[key]);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
	
		
			
				|  | @@ -263,16 +268,19 @@ namespace Logs
 | 
	
		
			
				|  |  |              xmlDoc.AppendChild(configuration);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              //InitRepository.LoggerRepository ??= LogManager.CreateRepository("NETCoreRepository");
 | 
	
		
			
				|  |  | -            LoggerRepository ??= LogManager.CreateRepository("NETCoreRepository");
 | 
	
		
			
				|  |  | +            if (LoggerRepository == null)
 | 
	
		
			
				|  |  | +                LoggerRepository = LogManager.CreateRepository("NETCoreRepository");
 | 
	
		
			
				|  |  |              XmlConfigurator.Configure(LoggerRepository, new StreamReader(new MemoryStream(Encoding.ASCII.GetBytes(xmlDoc.OuterXml))).BaseStream);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (_cleanSet) return;
 | 
	
		
			
				|  |  | -            _cleanSet = true;
 | 
	
		
			
				|  |  | -            _previousCleanDay = DateTime.Now.ToString("yyyyMMdd");
 | 
	
		
			
				|  |  | -            // clean log
 | 
	
		
			
				|  |  | -            _logCleanTimer = new Timer(1000 * 60);
 | 
	
		
			
				|  |  | -            _logCleanTimer.Elapsed += LogCleanTimer_Elapsed;
 | 
	
		
			
				|  |  | -            _logCleanTimer.Enabled = true;
 | 
	
		
			
				|  |  | +            if (!_cleanSet)
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                _cleanSet = true;
 | 
	
		
			
				|  |  | +                _previousCleanDay = DateTime.Now.ToString("yyyyMMdd");
 | 
	
		
			
				|  |  | +                // clean log
 | 
	
		
			
				|  |  | +                _logCleanTimer = new Timer(1000 * 60);
 | 
	
		
			
				|  |  | +                _logCleanTimer.Elapsed += LogCleanTimer_Elapsed;
 | 
	
		
			
				|  |  | +                _logCleanTimer.Enabled = true;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
	
		
			
				|  | @@ -283,53 +291,53 @@ namespace Logs
 | 
	
		
			
				|  |  |          /// <param name="config"></param>
 | 
	
		
			
				|  |  |          private static void CreateXml(XmlDocument xmlDoc, XmlElement root, LogConfigModel config)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            foreach (var key in config.SubLogNames!.Keys)
 | 
	
		
			
				|  |  | +            foreach (var key in config.SubLogNames.Keys)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  // 创建 Logger
 | 
	
		
			
				|  |  | -                var logger = xmlDoc.CreateElement("logger");
 | 
	
		
			
				|  |  | +                XmlElement logger = xmlDoc.CreateElement("logger");
 | 
	
		
			
				|  |  |                  logger.SetAttribute("name", config.SubLogNames[key]);
 | 
	
		
			
				|  |  | -                var level = xmlDoc.CreateElement("level");
 | 
	
		
			
				|  |  | +                XmlElement level = xmlDoc.CreateElement("level");
 | 
	
		
			
				|  |  |                  level.SetAttribute("value", "ALL");
 | 
	
		
			
				|  |  | -                var appenderRef = xmlDoc.CreateElement("appender-ref");
 | 
	
		
			
				|  |  | -                appenderRef.SetAttribute("ref", $"{config.SubLogNames[key]}Appender");
 | 
	
		
			
				|  |  | +                XmlElement appender_ref = xmlDoc.CreateElement("appender-ref");
 | 
	
		
			
				|  |  | +                appender_ref.SetAttribute("ref", $"{config.SubLogNames[key]}Appender");
 | 
	
		
			
				|  |  |                  logger.AppendChild(level);
 | 
	
		
			
				|  |  | -                logger.AppendChild(appenderRef);
 | 
	
		
			
				|  |  | +                logger.AppendChild(appender_ref);
 | 
	
		
			
				|  |  |                  // 创建 Appender
 | 
	
		
			
				|  |  | -                var appender = xmlDoc.CreateElement("appender");
 | 
	
		
			
				|  |  | +                XmlElement appender = xmlDoc.CreateElement("appender");
 | 
	
		
			
				|  |  |                  appender.SetAttribute("name", $"{config.SubLogNames[key]}Appender");
 | 
	
		
			
				|  |  |                  appender.SetAttribute("type", "log4net.Appender.RollingFileAppender");
 | 
	
		
			
				|  |  | -                var param = xmlDoc.CreateElement("param");
 | 
	
		
			
				|  |  | +                XmlElement param = xmlDoc.CreateElement("param");
 | 
	
		
			
				|  |  |                  param.SetAttribute("name", "Encoding");
 | 
	
		
			
				|  |  |                  param.SetAttribute("value", "utf-8");
 | 
	
		
			
				|  |  |                  appender.AppendChild(param);
 | 
	
		
			
				|  |  | -                var file = xmlDoc.CreateElement("file");
 | 
	
		
			
				|  |  | -                file.SetAttribute("value", Path.Combine(config.FileName!, config.Name!));
 | 
	
		
			
				|  |  | +                XmlElement file = xmlDoc.CreateElement("file");
 | 
	
		
			
				|  |  | +                file.SetAttribute("value", Path.Combine(config.FileName, config.Name));
 | 
	
		
			
				|  |  |                  appender.AppendChild(file);
 | 
	
		
			
				|  |  | -                var appendToFile = xmlDoc.CreateElement("appendToFile");
 | 
	
		
			
				|  |  | +                XmlElement appendToFile = xmlDoc.CreateElement("appendToFile");
 | 
	
		
			
				|  |  |                  appendToFile.SetAttribute("value", "true");
 | 
	
		
			
				|  |  |                  appender.AppendChild(appendToFile);
 | 
	
		
			
				|  |  | -                var rollingStyle = xmlDoc.CreateElement("rollingStyle");
 | 
	
		
			
				|  |  | +                XmlElement rollingStyle = xmlDoc.CreateElement("rollingStyle");
 | 
	
		
			
				|  |  |                  rollingStyle.SetAttribute("value", "Composite");
 | 
	
		
			
				|  |  |                  appender.AppendChild(rollingStyle);
 | 
	
		
			
				|  |  | -                var maxSizeRollBackups = xmlDoc.CreateElement("maxSizeRollBackups");
 | 
	
		
			
				|  |  | +                XmlElement maxSizeRollBackups = xmlDoc.CreateElement("maxSizeRollBackups");
 | 
	
		
			
				|  |  |                  maxSizeRollBackups.SetAttribute("value", "-1");
 | 
	
		
			
				|  |  |                  appender.AppendChild(maxSizeRollBackups);
 | 
	
		
			
				|  |  | -                var maximumFileSize = xmlDoc.CreateElement("maximumFileSize");
 | 
	
		
			
				|  |  | +                XmlElement maximumFileSize = xmlDoc.CreateElement("maximumFileSize");
 | 
	
		
			
				|  |  |                  maximumFileSize.SetAttribute("value", $"{_fileSize}MB");
 | 
	
		
			
				|  |  |                  appender.AppendChild(maximumFileSize);
 | 
	
		
			
				|  |  | -                var lockingModel = xmlDoc.CreateElement("lockingModel");
 | 
	
		
			
				|  |  | +                XmlElement lockingModel = xmlDoc.CreateElement("lockingModel");
 | 
	
		
			
				|  |  |                  lockingModel.SetAttribute("type", "log4net.Appender.FileAppender+MinimalLock");
 | 
	
		
			
				|  |  |                  appender.AppendChild(lockingModel);
 | 
	
		
			
				|  |  | -                var staticLogFileName = xmlDoc.CreateElement("staticLogFileName");
 | 
	
		
			
				|  |  | +                XmlElement staticLogFileName = xmlDoc.CreateElement("staticLogFileName");
 | 
	
		
			
				|  |  |                  staticLogFileName.SetAttribute("value", "false");
 | 
	
		
			
				|  |  |                  appender.AppendChild(staticLogFileName);
 | 
	
		
			
				|  |  | -                var datePattern = xmlDoc.CreateElement("DatePattern");
 | 
	
		
			
				|  |  | -                datePattern.SetAttribute("value", $"/yyyyMMdd/'{config.SubLogNames[key]}.log'");
 | 
	
		
			
				|  |  | -                appender.AppendChild(datePattern);
 | 
	
		
			
				|  |  | -                var layout = xmlDoc.CreateElement("layout");
 | 
	
		
			
				|  |  | +                XmlElement DatePattern = xmlDoc.CreateElement("DatePattern");
 | 
	
		
			
				|  |  | +                DatePattern.SetAttribute("value", $"/yyyyMMdd/'{config.SubLogNames[key]}.log'");
 | 
	
		
			
				|  |  | +                appender.AppendChild(DatePattern);
 | 
	
		
			
				|  |  | +                XmlElement layout = xmlDoc.CreateElement("layout");
 | 
	
		
			
				|  |  |                  layout.SetAttribute("type", "log4net.Layout.PatternLayout");
 | 
	
		
			
				|  |  | -                var conversionPattern = xmlDoc.CreateElement("conversionPattern");
 | 
	
		
			
				|  |  | -                conversionPattern.SetAttribute("value", "%date || %thread || %5level || %message ||end %newline");
 | 
	
		
			
				|  |  | +                XmlElement conversionPattern = xmlDoc.CreateElement("conversionPattern");
 | 
	
		
			
				|  |  | +                conversionPattern.SetAttribute("value", "%date [%thread] %-5level - %message%newline");
 | 
	
		
			
				|  |  |                  layout.AppendChild(conversionPattern);
 | 
	
		
			
				|  |  |                  appender.AppendChild(layout);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -347,19 +355,19 @@ namespace Logs
 | 
	
		
			
				|  |  |                  _previousCleanDay = DateTime.Now.ToString("yyyyMMdd");
 | 
	
		
			
				|  |  |                  if (!Directory.Exists(_configPath))
 | 
	
		
			
				|  |  |                      return;
 | 
	
		
			
				|  |  | -                var typeDirs = Directory.GetDirectories(_configPath);
 | 
	
		
			
				|  |  | -                foreach (var t in typeDirs)
 | 
	
		
			
				|  |  | +                string[] typeDirs = Directory.GetDirectories(_configPath);
 | 
	
		
			
				|  |  | +                for (int i = 0; i < typeDirs.Length; i++)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    var dateDirs = Directory.GetDirectories(t);
 | 
	
		
			
				|  |  | -                    foreach (var t1 in dateDirs)
 | 
	
		
			
				|  |  | +                    string[] dateDirs = Directory.GetDirectories(typeDirs[i]);
 | 
	
		
			
				|  |  | +                    for (int j = 0; j < dateDirs.Length; j++)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  | -                        var dirName = t1[(t1.LastIndexOf('\\') + 1)..];
 | 
	
		
			
				|  |  | +                        string dirName = dateDirs[j].Substring(dateDirs[j].LastIndexOf('\\') + 1);
 | 
	
		
			
				|  |  |                          if (Convert.ToInt32(dirName) < Convert.ToInt32(DateTime.Now.AddDays(_cleanDays * -1).ToString("yyyyMMdd")))
 | 
	
		
			
				|  |  | -                            Directory.Delete(t1, true);
 | 
	
		
			
				|  |  | +                            Directory.Delete(dateDirs[j], true);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            catch (Exception)
 | 
	
		
			
				|  |  | +            catch (Exception ex)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  //LogInfo.Log.Info(ex.Message, ex, "FATAL");
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -367,4 +375,4 @@ namespace Logs
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          #endregion 初始化日志
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +}
 |