• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.Log
    • AbstractLogger
    • ILogger
    • ILoggerConfiguration
    • LoggerMapper
    • LogInfo
    • LogInfoExtensions
    • LogLevels
    • LogSettings
    • LogSource
    • LogSourceExtensions
    • NullLogger
  • Dapplo.Log.LogFile
    • FileLogger
    • ForwardingLogger
    • IFileLoggerConfiguration
  • Dapplo.Log.Loggers
    • ColorConsoleLogger
    • ConsoleLogger
    • DebugLogger
    • StringWriterLogger
    • TraceLogger
  • Dapplo.Log.XUnit
    • XUnitLogger

Class ColorConsoleLogger

A console logger with colors, an implementation for logging messages to a console where every log level has a different color.

Inheritance
System.Object
AbstractLogger
ColorConsoleLogger
Inherited Members
AbstractLogger.Configure(ILoggerConfiguration)
AbstractLogger.Format(LogInfo, String, Object[])
AbstractLogger.LogLevel
AbstractLogger.UseShortSource
AbstractLogger.DateTimeFormat
AbstractLogger.LogLineFormat
AbstractLogger.IsLogLevelEnabled(LogLevels, LogSource)
AbstractLogger.ReplacedWith(ILogger)
AbstractLogger.WriteLine(LogInfo, String, Object[])
AbstractLogger.WriteLine(LogInfo, Exception, String, Object[])
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Dapplo.Log.Loggers
Assembly:Dapplo.Log.Loggers.dll
Syntax
public class ColorConsoleLogger : AbstractLogger, ILogger, ILoggerConfiguration

Properties

| Improve this Doc View Source

BackgroundColors

Maps the LogLevels level to a background color, levels that are not available map to black.

Declaration
public IDictionary<LogLevels, ConsoleColor> BackgroundColors { get; set; }
Property Value
Type Description
System.Collections.Generic.IDictionary<LogLevels, System.ConsoleColor>
| Improve this Doc View Source

ForegroundColors

Maps the LogLevels level to a foreground color, levels that are not available map to white.

Declaration
public IDictionary<LogLevels, ConsoleColor> ForegroundColors { get; set; }
Property Value
Type Description
System.Collections.Generic.IDictionary<LogLevels, System.ConsoleColor>

Methods

| Improve this Doc View Source

Write(LogInfo, String, Object[])

Write a message with parameters to the logger

Declaration
public override void Write(LogInfo logInfo, string messageTemplate, params object[] logParameters)
Parameters
Type Name Description
LogInfo logInfo

LogInfo

System.String messageTemplate

string with the message template

System.Object[] logParameters

object array with the parameters for the template

Overrides
AbstractLogger.Write(LogInfo, String, Object[])
  • Improve this Doc
  • View Source
Back to top Copyright © 2017 Dapplo