Appends colorful logging events to the console, using the .NET 2 built-in capabilities.
For a list of all members of this type, see ManagedColoredConsoleAppender Members.
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
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:
[XML] <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
Assembly: log4net (in log4net.dll)