Exemplo n.º 1
0
 private void Logger_NewLogEvent(object sender, NewLogEventArgs e)
 {
     Application.Current.Dispatcher.Invoke(
         DispatcherPriority.Background,
         new Action <string>((m) => this.listViewLogs.Items.Add(m)),
         e.LogMessage);
 }
Exemplo n.º 2
0
 private static void Logger_OnNewLog(ILogger log, NewLogEventArgs e)
 {
     if (e.Ex != null)
     {
         WriteEx(e.Ex);
     }
     if (!string.IsNullOrEmpty(e.Log))
     {
         WriteLog(e.Log);
     }
 }