Beispiel #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     for (int i = 0; i < 50; i++)
     {
         LogDynamicHelper.CreateInstance().WriteLog(LogLevel.Exception, LogSeparator.CreateInstance("\r\n"), "JR1", new object[] { "1.0." + i, System.Reflection.MethodBase.GetCurrentMethod().Name, CommonHelper.GetLineNum(), "我是错误Exception" });
         LogDynamicHelper.CreateInstance().WriteLog(LogLevel.Error, LogSeparator.CreateInstance("\r\n"), "JR2", new object[] { "1.0." + i, System.Reflection.MethodBase.GetCurrentMethod().Name, CommonHelper.GetLineNum(), "我是错误Error" });
         LogDynamicHelper.CreateInstance().WriteLog(LogLevel.Warning, LogSeparator.CreateInstance("\r\n"), "JR3", new object[] { "1.0." + i, System.Reflection.MethodBase.GetCurrentMethod().Name, CommonHelper.GetLineNum(), "我是错误Warning" });
         LogDynamicHelper.CreateInstance().WriteLog(LogLevel.Information, LogSeparator.CreateInstance("\r\n"), "JR4", new object[] { "1.0." + i, System.Reflection.MethodBase.GetCurrentMethod().Name, CommonHelper.GetLineNum(), "我是错误Information" });
     }
 }
Beispiel #2
0
 public void WriteLog(LogLevel level, string remark, object[] param)
 {
     WriteLog(level, LogSeparator.CreateInstance("\r\n"), remark, param);
 }
Beispiel #3
0
 public void WriteLog(LogLevel level, object[] param)
 {
     WriteLog(level, LogSeparator.CreateInstance("\r\n"), "", param);
 }
Beispiel #4
0
 //string logSource
 public void WriteLog(Exception ex)
 {
     WriteLog(LogLevel.Exception, LogSeparator.CreateInstance("\r\n"), "", ex.Message);
 }