Write() public method

public Write ( string text ) : void
text string
return void
Exemplo n.º 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)));
        }
Exemplo n.º 2
0
 protected override void Append(LoggingEvent logEvent)
 {
     _console.Write(RenderLoggingEvent(logEvent));
 }