<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
    <Appenders>
        # Rolling appender
        <RollingFile name="roll-by-size"
                     fileName="log.txt"
                     filePattern="log-%d{yyyy-MM-dd}-%i.txt.gz"
                     ignoreExceptions="false">
            <PatternLayout>
                <Pattern>[%-5p] %d{yyyy-MM-dd HH:mm:ss.SSS} %c{1} %m%n
                </Pattern>
            </PatternLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size="5KB"/>
            </Policies>
            <DefaultRolloverStrategy max="200"/>
        </RollingFile>

        # Console appender
        <Console name="stdout" target="SYSTEM_OUT">
            # Pattern of log message for console appender
            <PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} %c{1} - %msg%n"/>
        </Console>
    </Appenders>

    <Loggers>
        # Override log level for specified package
        <Logger name="de.swingbe.rollinglog" level="all">
            <appender-ref ref="roll-by-size" level="all"/>
        </Logger>
        <Root level="all" additivity="false">
            <appender-ref ref="stdout"/>
        </Root>
    </Loggers>

</Configuration>
