2022-04-01 17:03:54 +08:00
|
|
|
|
// ********************************************************************************
|
|
|
|
|
// 文件名字: LoggerService
|
|
|
|
|
// 文件描述: LoggerService
|
|
|
|
|
// 开发人员: Michael
|
|
|
|
|
// 创建时间: 2019/11/8 0:08
|
|
|
|
|
//
|
|
|
|
|
// 更新历史:
|
|
|
|
|
// + 创建 LoggerService.cs 文件. by Michael @2019/11/8 0:08
|
|
|
|
|
// ********************************************************************************
|
|
|
|
|
using log4net;
|
|
|
|
|
using System;
|
|
|
|
|
|
2022-12-16 13:01:24 +08:00
|
|
|
|
|
|
|
|
|
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
|
2022-04-01 17:03:54 +08:00
|
|
|
|
namespace Glorysoft.SECS.EQP.Utilities
|
|
|
|
|
{
|
|
|
|
|
public class LoggerService
|
|
|
|
|
{
|
|
|
|
|
public static ILog SECSLogger { get; private set; }
|
|
|
|
|
public static ILog SYSLogger { get; private set; }
|
|
|
|
|
public static ILog MQLogger { get; private set; }
|
|
|
|
|
|
|
|
|
|
public const string Receive = "Receive";
|
|
|
|
|
public const string Send = "Send";
|
|
|
|
|
|
|
|
|
|
static LoggerService()
|
|
|
|
|
{
|
2022-12-16 13:01:24 +08:00
|
|
|
|
//var sPath = string.Concat(AppDomain.CurrentDomain.BaseDirectory, @"\logs");
|
|
|
|
|
//LogManager.ConfigureLogger(nameof(SYSLogger), sPath, eLogFilter.DEBUG, eLogFilter.DEBUG | eLogFilter.INFO | eLogFilter.ERROR | eLogFilter.WARN, eFileFomart.Date, null);
|
|
|
|
|
//LogManager.ConfigureLogger(nameof(SECSLogger), sPath, eLogFilter.DEBUG, eLogFilter.DEBUG | eLogFilter.INFO | eLogFilter.ERROR | eLogFilter.WARN, eFileFomart.Date, null);
|
|
|
|
|
//LogManager.ConfigureLogger(nameof(MQLogger), sPath, eLogFilter.DEBUG, eLogFilter.DEBUG | eLogFilter.INFO | eLogFilter.ERROR | eLogFilter.WARN, eFileFomart.Date, null);
|
|
|
|
|
//SYSLogger = LogManager.GetConfigureLogger(nameof(SYSLogger));
|
|
|
|
|
//SECSLogger = LogManager.GetConfigureLogger(nameof(SECSLogger));
|
|
|
|
|
//MQLogger = LogManager.GetConfigureLogger(nameof(MQLogger));
|
|
|
|
|
SECSLogger = LogManager.GetLogger(nameof(SECSLogger));
|
|
|
|
|
SYSLogger = LogManager.GetLogger(nameof(SYSLogger));
|
|
|
|
|
MQLogger = LogManager.GetLogger(nameof(MQLogger));
|
2022-04-01 17:03:54 +08:00
|
|
|
|
}
|
2022-07-27 14:46:20 +08:00
|
|
|
|
|
|
|
|
|
public static void GuiLogWrite()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2022-04-01 17:03:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|