Пример #1
0
 /// <summary>
 /// 创建日志服务
 /// </summary>
 /// <param name="logConfig"></param>
 /// <returns></returns>
 public override LoggingService CreateLogService(LogServiceConfig logConfig)
 {
     LoggingService logService = new TXTLogService(logConfig);
     logService.SetLogPersistenceService(new StreamFileLPS(logConfig));
     logService.SetLogFormatter(LogManager.GetLogFormatter(logConfig));
     LogManager.RegisterLogService(LogManager.GetLogName(logConfig), logService);
     return logService;
 }
Пример #2
0
        /// <summary>
        /// 创建日志服务
        /// </summary>
        /// <param name="logConfig"></param>
        /// <returns></returns>
        public override LoggingService CreateLogService(LogServiceConfig logConfig)
        {
            LoggingService logService = new TXTLogService(logConfig);

            logService.SetLogPersistenceService(new StreamFileLPS(logConfig));
            logService.SetLogFormatter(LogManager.GetLogFormatter(logConfig));
            LogManager.RegisterLogService(LogManager.GetLogName(logConfig), logService);
            return(logService);
        }