Log4Net Console in color

<?xml version="1.0"?>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
    <appender name="Console" type="log4net.Appender.ColoredConsoleAppender">
        <level value="ERROR"/>
        <foreColor value="Red, HighIntensity"/>
        <level value="WARN"/>
        <backColor value="Yellow"/>
        <foreColor value="Blue, HighIntensity"/>
        <level value="INFO"/>
        <foreColor value="White"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d{HH:mm:ss} %-5p %M: %m%n" />
      <param name="Threshold" value="INFO" />
      <appender-ref ref="Console" />

More info about ColoredConsoleAppender


Popular posts from this blog

Parse XML to dynamic object in C#

Parse XML to object model in C# using XSD utility