<?xml version="1.0" encoding="utf-8" ?>
<log4net xmlns="http://www.w3.org/2001/XMLSchema-instance">
    <root>
        <level value="ALL" />
        <appender-ref ref="asyncAppender" />
    </root>

    <appender name="asyncAppender" type="ZXMAK2.Logging.Appenders.AsyncAppender, ZXMAK2.Logging" >
        <appender-ref ref="fileAppender" />
        <!--<appender-ref ref="consoleAppender" />-->
    </appender>

    <appender name="consoleAppender" type="ZXMAK2.Logging.Appenders.ConsoleAppender, ZXMAK2.Logging">
        <AllocMode value="Auto" />
        <AutoLevel value="All" />
        <mapping>
            <level value="Debug"/>
            <foreColor value="DarkYellow"/>
        </mapping>
        <mapping>
            <level value="Info"/>
            <foreColor value="Green"/>
        </mapping>
        <mapping>
            <level value="Warn"/>
            <foreColor value="Yellow"/>
        </mapping>
        <mapping>
            <level value="Error"/>
            <foreColor value="Red"/>
        </mapping>
        <mapping>
            <level value="Fatal"/>
            <foreColor value="Black"/>
            <backColor value="Red" />
        </mapping>
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="[%date{HH:mm:ss.fff}][%-5level] %message%newline" />
        </layout>
    </appender>

    <appender name="fileAppender" type="log4net.Appender.RollingFileAppender">
        <file
            type="log4net.Util.PatternString"
            value="C:\Logs\ZXMAK2.log" />

        <appendToFile value="true" />
        <rollingStyle value="Composite" />
        <datePattern value="'.'yyyy'-'MM'-'dd" />
        <maxSizeRollBackups value="0" />
        <maximumFileSize value="1GB" />
        <countDirection value="-1"/>
        <preserveLogFileNameExtension value="true" />

        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern
                value="[%date{HH:mm:ss.fff}][%-4thread][%-5level] %message%newline" />
        </layout>
    </appender>
</log4net>
