<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>
    <appender name="XSERVICES-LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>../logs/XServices.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <!-- rollover daily -->
            <fileNamePattern>XServices-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
            <!-- each file should be at most 100MB, keep 60 days worth of history, but at most 20GB -->
            <maxFileSize>100MB</maxFileSize>
            <maxHistory>60</maxHistory>
            <totalSizeCap>4GB</totalSizeCap>
        </rollingPolicy>
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <logger name="org.quartz" level="ERROR" />
    <logger name="org.apache.shiro" level="ERROR" />
    <logger name="net.brutex.xservices" additivity="false" level="INFO">
            <appender-ref ref="XSERVICES-LOG"  />
    </logger>


    <root level="WARN">
        <appender-ref ref="STDOUT" /> <!-- This is usually captured by tomcat server.log -->
        <appender-ref ref="XSERVICES-LOG" />
    </root>
</configuration>