<configuration>

    <property name="log_folder" value="${log_folder}"/>

    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="ROLLING_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log_folder}/ConnSolace.log</file>
        <append>true</append>

        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${log_folder}/ConnSolace.%d{yyyy-ww}-%i.log</fileNamePattern>
            <maxFileSize>10MB</maxFileSize>
            <maxHistory>12</maxHistory>
            <totalSizeCap>100MB</totalSizeCap>
        </rollingPolicy>

        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="SOLACE_ORACLE_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log_folder}/SolaceToOracle.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${log_folder}/SolaceToOracle.%d{yyyy-MM-dd}.%i.zip</fileNamePattern>
            <maxFileSize>10MB</maxFileSize>
            <maxHistory>12</maxHistory>
            <totalSizeCap>100MB</totalSizeCap>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>
    
    <logger name="com.abslbs.solace.SolaceConsuming" level="INFO" additivity="false">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="SOLACE_ORACLE_APPENDER" />
    </logger>
    
    <logger name="com.abslbs.oracle.OracleAQPublishing" level="INFO" additivity="false">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="SOLACE_ORACLE_APPENDER" />
    </logger>

    <appender name="ORACLE_SOLACE_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log_folder}/OracleToSolace.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${log_folder}/OracleToSolace.%d{yyyy-MM-dd}.%i.zip</fileNamePattern>
            <maxFileSize>10MB</maxFileSize>
            <maxHistory>12</maxHistory>
            <totalSizeCap>100MB</totalSizeCap>
        </rollingPolicy>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>
    
    <logger name="com.abslbs.oracle.OracleAQConsuming" level="INFO" additivity="false">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="ORACLE_SOLACE_APPENDER" />
    </logger>
    <logger name="com.abslbs.solace.SolacePublishing" level="INFO" additivity="false">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="ORACLE_SOLACE_APPENDER" />
    </logger>

    <root level="INFO">
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="ROLLING_FILE"/>
    </root>
    
</configuration>
