using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace parkMonitor.LOG
{
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 void ReadLog(out string sqlStatus, out string sqlMsg,out int count)
{
sqlStatus = null;
sqlMsg = null;
count = 0;
try
{
logManager.ReadLog(out sqlStatus,out sqlMsg,out count);
}
catch { }
}
}
}