using System.Collections.Generic;
namespace Test
{
public static class Log
{
private static LogManager logManager;
static Log()
{
LogManager.Init();
logManager = new LogManager();
}
///
/// 写文件类型
///
///
///
///
public static void WriteLog(LogType logType, LogFile logFile, string msg)
{
try
{
logManager.WriteLog(logType, logFile, msg);
}
catch
{
}
}
///
/// 文件类型为null
///
///
///
public static void WriteLog(LogType logType, string msg)
{
try
{
logManager.WriteLog(logType, string.Empty, msg);
}
catch
{
}
}
///
/// 数据库异常的标志位
/// 0表示update,1表示insert
///
///
///
///
public static void WriteLog(LogType logType, string status, string msg)
{
try
{
logManager.WriteLog(logType, status, msg);
}
catch
{
}
}
///
/// 读日志文件
///
///
///
///
public static List ReadLog()
{
List digitList = null;
try
{
digitList = logManager.ReadLog();
}
catch { }
return digitList;
}
public static void WriteCredence(string msg)
{
try
{
logManager.WriteCredence(msg);
}
catch { }
}
public static void WriteData(string name, string msg)
{
try
{
logManager.WriteData(name, msg);
}
catch { }
}
}
}