using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace tool { public class Log:Singleton { private Log() { } public void LogInit() { LogManager.Instance.LogManagerInit(); } /// /// 写文件类型 /// /// /// /// public void WriteLog(LogType logType, LogFile logFile, string msg) { try { LogManager.Instance.WriteLog(logType, logFile, msg); } catch { } } /// /// 文件类型为null /// /// /// public void WriteLog(LogType logType, string msg) { try { LogManager.Instance.WriteLog(logType, string.Empty, msg); } catch { } } /// /// 数据库异常的标志位 /// 0表示update,1表示insert /// /// /// /// public void WriteLog(LogType logType, string status, string msg) { try { LogManager.Instance.WriteLog(logType, status, msg); } catch { } } /// /// 读日志文件 /// /// /// /// public List ReadLog() { List digitList = null; try { digitList = LogManager.Instance.ReadLog(); } catch { } return digitList; } public void WriteCredence(string msg) { try { LogManager.Instance.WriteCredence(msg); } catch { } } } }