/// <summary> /// Handler for system logger /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void ret_LogEntryAdded(object sender, Logger.LogEntryAddedEventArgs e) { try { System.Diagnostics.Trace.WriteLine(e.LogEntry.Text); } catch { } }
static void ret_LogEntryAdded(PythonFile file, object sender, Logger.LogEntryAddedEventArgs e) { string text = e.LogEntry.Text; if (e.LogEntry.ExceptionObject != null) { text = e.LogEntry.ExceptionObject.ToString(); } file.write(String.Format("[{0}] {1} {2}: {3}\n", e.LogEntry.EntryType, e.LogEntry.Timestamp, e.LogEntry.SourceName, text)); }