|
|
|
@ -49,11 +49,7 @@ namespace SlnMesnac.RfidUpload.NLog
|
|
|
|
|
}
|
|
|
|
|
public readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("loginfo");
|
|
|
|
|
public readonly log4net.ILog logerror = log4net.LogManager.GetLogger("logerror");
|
|
|
|
|
public readonly log4net.ILog logPlc = log4net.LogManager.GetLogger("plclog");
|
|
|
|
|
public readonly log4net.ILog logRfid = log4net.LogManager.GetLogger("rfidlog");
|
|
|
|
|
public readonly log4net.ILog logView = log4net.LogManager.GetLogger("viewlog");
|
|
|
|
|
public readonly log4net.ILog sqllog = log4net.LogManager.GetLogger("sqllog");
|
|
|
|
|
public readonly log4net.ILog semaphorelog = log4net.LogManager.GetLogger("semaphorelog");
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 记录Info日志
|
|
|
|
|
/// </summary>
|
|
|
|
@ -67,58 +63,7 @@ namespace SlnMesnac.RfidUpload.NLog
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 记录PLC日志
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="msg"></param>
|
|
|
|
|
public void PlcLog(string msg)
|
|
|
|
|
{
|
|
|
|
|
if (logPlc.IsInfoEnabled)
|
|
|
|
|
{
|
|
|
|
|
logPlc.Info(msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 记录Rfid日志
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="msg"></param>
|
|
|
|
|
public void RfidLog(string msg)
|
|
|
|
|
{
|
|
|
|
|
if (logRfid.IsInfoEnabled)
|
|
|
|
|
{
|
|
|
|
|
logRfid.Info(msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 界面日志
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="msg"></param>
|
|
|
|
|
public void ViewLog(string msg)
|
|
|
|
|
{
|
|
|
|
|
if (logView.IsInfoEnabled)
|
|
|
|
|
{
|
|
|
|
|
logView.Info(msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SqlLog(string msg)
|
|
|
|
|
{
|
|
|
|
|
if (sqllog.IsInfoEnabled)
|
|
|
|
|
{
|
|
|
|
|
sqllog.Info(msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SemaphoreLog(string msg)
|
|
|
|
|
{
|
|
|
|
|
if (semaphorelog.IsInfoEnabled)
|
|
|
|
|
{
|
|
|
|
|
semaphorelog.Info(msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 记录Error日志
|
|
|
|
|
/// </summary>
|
|
|
|
|