Write() public method

public Write ( string text ) : void
text string
return void
Beispiel #1
0
        protected override void Append(LoggingEvent logEvent)
        {
            var newColor = _console.CUI.ForegroundColor;

            switch (logEvent.Level.ToString().ToUpperInvariant())
            {
            case "FATAL":
            case "ERROR":
                newColor = ConsoleColor.Red;
                break;

            case "WARN":
                newColor = ConsoleColor.Yellow;
                break;

            case "TRACE":
            case "DEBUG":
                newColor = ConsoleColor.DarkGray;
                break;

            default:
                break;
            }
            _console.CUI.WithColor(newColor, () => _console.Write(RenderLoggingEvent(logEvent)));
        }
Beispiel #2
0
 protected override void Append(LoggingEvent logEvent)
 {
     _console.Write(RenderLoggingEvent(logEvent));
 }