public void Log(LogEvent logEvent) { lock (syncLock) { var oldColor = Console.ForegroundColor; Console.ForegroundColor = levelToColor[logEvent.Level]; Console.Out.Write(LogEventFormatter.Format(logEvent)); Console.ForegroundColor = oldColor; } }
public void Log(LogEvent logEvent) { output.Invoke(LogEventFormatter.Format(logEvent)); }