public void Render(SystemEvent e) { if (filter.Exclude(e)) { return; } Console.ForegroundColor = timestampColor; Console.BackgroundColor = defaultBackColor; Console.Write(String.Format("{0:HH:mm:ss,fff} ", e.Timestamp)); Console.BackgroundColor = Settings.GetBackeColor(e.Level); Console.ForegroundColor = Settings.GetForeColor(e.Level); stringBuilder.Clear(); stringBuilder.AppendFormat("[{0}] ", GetProcessId(e)); stringBuilder.AppendFormat("{0} ", GetProcessName(e)); stringBuilder.AppendFormat("[{0}] ", GetThread(e)); stringBuilder.AppendFormat("{0} ", GetSource(e)); stringBuilder.AppendFormat("[{0}] ", GetLevel(e)); stringBuilder.Append(e.Message); Console.WriteLine(stringBuilder.ToString()); }
public Boolean Exclude(SystemEvent e) { return(e == null || staticFilter.Exclude(e) || dynamicFilter != null && dynamicFilter.Exclude(e)); }