log4net.Appender AppenderSkeleton
log4net.Appender ManagedColoredConsoleAppender
Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 1.2.15.0 (1.2.15.0)
ManagedColoredConsoleAppender appends log events to the standard output stream or the error output stream using a layout specified by the user. It also allows the color of a specific type of message to be set.
By default, all output is written to the console's standard output stream. The Target property can be set to direct the output to the error stream.
When configuring the colored console appender, mappings should be specified to map logging levels to colors. For example:
<mapping><level value="ERROR" /><foreColor value="DarkRed" /><backColor value="White" /></mapping><mapping><level value="WARN" /><foreColor value="Yellow" /></mapping><mapping><level value="INFO" /><foreColor value="White" /></mapping><mapping><level value="DEBUG" /><foreColor value="Blue" /></mapping>
The Level is the standard log4net logging level while ForeColor and BackColor are the values of ConsoleColor enumeration.
Based on the ColoredConsoleAppender