Beispiel #1
0
 void Log_LogDebug(LogEventArgs e)
 {
     MethodInvoker method = delegate
                              {
                                  textBox1.AppendText((string)e.Message);
                                  if (e.Exception != null)
                                      textBox1.AppendText((string)e.Exception.StackTrace);
                                  textBox1.AppendText(Environment.NewLine);
                              };
     if (InvokeRequired)
         BeginInvoke(method);
     else
         method.Invoke();
 }
 private void Log_LogInfo(LogEventArgs e)
 {
     this.logger.AppendFormat("Info: {0}{1}", e.Message, Environment.NewLine);
 }
 private static void Log_LogDebug(LogEventArgs e)
 {
     _log.Debug(e.Message, e.Exception);
 }
 private static void Log_LogError(LogEventArgs e)
 {
     _log.Error(e.Message, e.Exception);
 }