<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug="true">

    <appender name="CONSOLE-DEBUG" class="org.apache.log4j.ConsoleAppender">
        <param name="target" value="System.out"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
        </layout>
        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="INFO"/>
        </filter>
    </appender>




    <appender name="CONSOLE-WARN" class="org.apache.log4j.ConsoleAppender">
        <param name="target" value="System.err"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
        </layout>
        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="WARN"/>
        </filter>
    </appender>

    <appender name="GENERAL-LOG-FILE" class="org.apache.log4j.DailyRollingFileAppender">
        <param name="file" value="logs/next.log"/>
        <param name="append" value="true"/>
        <param name="DatePattern" value="'.'yyyy-MM-dd"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]:%M:%L - %m%n"/>
        </layout>
        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="DEBUG"/>
        </filter>
    </appender>


    <appender name="fixMessagesLog" class="org.apache.log4j.DailyRollingFileAppender">
        <param name="File" value="logs/fix.log"/>
        <param name="append" value="true"/>
        <param name="DatePattern" value="'.'yyyy-MM-dd"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]:%M:%L - %m%n"/>
        </layout>
        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="DEBUG"/>
        </filter>
    </appender>


   <!-- <category name="FIX_MESS" additivity="false">
        <priority value="debug" />
        <appender-ref ref="application" />
    </category>-->


    <logger name="quickfixj.msg.incoming" additivity="false">
        <level value="debug"/>
        <appender-ref ref="fixMessagesLog" />
    </logger>
    <logger name="quickfixj.event" additivity="false">
        <level value="debug"/>
        <appender-ref ref="fixMessagesLog" />
    </logger>
    <logger name="quickfixj.errorEvent" additivity="false">
        <level value="debug"/>
        <appender-ref ref="fixMessagesLog" />
    </logger>
    <logger name="quickfixj.msg.outgoing" additivity="false">
        <level value="debug"/>
        <appender-ref ref="fixMessagesLog" />
    </logger>



    <root>
        <priority value="DEBUG"/>
        <appender-ref ref="CONSOLE-WARN"/>
        <appender-ref ref="CONSOLE-DEBUG"/>
        <appender-ref ref="GENERAL-LOG-FILE"/>
    </root>
</log4j:configuration>
