Exemple #1
0
 public static void Error(string _Content, params object[] _par)
 {
     System.Diagnostics.Debug.WriteLine(_Content, _par);
     if (WriteLog)
     {
         CommonLogger.GetLogger(LogBasePath).Error(string.Format(_Content, _par));
     }
 }
Exemple #2
0
 public static void Error2File(string _FileName, string _Content, params object[] _par)
 {
     if (ShowDebug)
     {
         System.Diagnostics.Debug.WriteLine(_Content, _par);
     }
     CommonLogger.GetLogger(LogBasePath, _FileName).Error(string.Format(_Content, _par));
 }
Exemple #3
0
 //[Conditional("TraceLog")]
 public static void Info2File(string _FileName, int _StackBack, string _Content, params object[] _par)
 {
     if (ShowDebug)
     {
         System.Diagnostics.Debug.WriteLine(_Content, _par);
     }
     if (WriteLog)
     {
         StackFrame frame = new StackFrame(_StackBack + 1, true);
         CommonLogger.GetLogger(LogBasePath, _FileName).Info(string.Format(_Content, _par) + string.Format("文件:{0}; 代码行:{1};", frame.GetFileName(), frame.GetFileLineNumber()));
         System.Diagnostics.Debug.WriteLine("文件:{0}; 代码行:{1};", frame.GetFileName(), frame.GetFileLineNumber());
     }
 }