public static void Error(string message, Exception exception = null) { LogAdapter.WriteLog(new LogRecord(LogLevel.ERROR, message, exception)); Trace.WriteLine(message); }
/// <summary> /// 写入Log信息 /// </summary> /// <param name="logLevel"></param> /// <param name="logMessage"></param> /// <param name="ex"></param> public static void WriteLog(LogLevel logLevel, string logMessage, Exception ex = null) { LogAdapter.WriteLog(new LogRecord(logLevel, logMessage, ex)); }
public static void Info(string message) { LogAdapter.WriteLog(new LogRecord(LogLevel.INFO, message, null)); Trace.WriteLine(message); }
/// <summary> /// 默认构造方法 /// </summary> public CIMBASE() { //Thread.CurrentThread.Name = "Main"; LogAdapter.WriteLog(new LogRecord(LogLevel.INFO, "Initialize CIM Module.")); }