示例#1
0
 public static void Error(string message, Exception exception = null)
 {
     LogAdapter.WriteLog(new LogRecord(LogLevel.ERROR, message, exception));
     Trace.WriteLine(message);
 }
示例#2
0
 /// <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));
 }
示例#3
0
 public static void Info(string message)
 {
     LogAdapter.WriteLog(new LogRecord(LogLevel.INFO, message, null));
     Trace.WriteLine(message);
 }
示例#4
0
 /// <summary>
 /// 默认构造方法
 /// </summary>
 public CIMBASE()
 {
     //Thread.CurrentThread.Name = "Main";
     LogAdapter.WriteLog(new LogRecord(LogLevel.INFO, "Initialize CIM Module."));
 }