Class ColorConsoleLogger
A console logger with colors, an implementation for logging messages to a console where every log level has a different color.
Inherited Members
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 SourceBackgroundColors
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> |
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 SourceWrite(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 |