<configuration scan="true" scanPeriod="10 seconds">

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder
            by default -->
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
            </pattern>
        </encoder>
    </appender>

    <appender name="GUI" class="ctbrec.ui.tabs.logging.CtbrecAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="FILE"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>ctbrec.log</file>
        <append>true</append>
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>DEBUG</level>
        </filter>
        <encoder>
            <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
        </encoder>
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>ctbrec.%i.log</fileNamePattern>
            <minIndex>1</minIndex>
            <maxIndex>3</maxIndex>
        </rollingPolicy>
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>5MB</maxFileSize>
        </triggeringPolicy>
    </appender>

    <root level="DEBUG">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="FILE"/>
        <appender-ref ref="GUI"/>
    </root>


    <logger name="ctbrec.LoggingInterceptor" level="INFO"/>
    <logger name="ctbrec.io.CookieJarImpl" level="INFO"/>
    <logger name="ctbrec.recorder.FFmpeg" level="DEBUG"/>
    <logger name="ctbrec.recorder.OnlineMonitor" level="INFO"/>
    <logger name="ctbrec.recorder.RecordingFileMonitor" level="TRACE"/>
    <logger name="ctbrec.recorder.download.dash.DashDownload" level="DEBUG"/>
    <logger name="ctbrec.recorder.server.HlsServlet" level="INFO"/>
    <logger name="ctbrec.recorder.server.RecorderServlet" level="INFO"/>
    <logger name="ctbrec.recorder.ThreadPoolScaler" level="DEBUG"/>
    <!-- <logger name="ctbrec.sites.cam4.Cam4Model" level="DEBUG"/> -->
    <!-- <logger name="ctbrec.sites.showup.Showup" level="TRACE"/> -->
    <logger name="ctbrec.ui.ExternalBrowser" level="DEBUG"/>
    <logger name="ctbrec.ui.ThumbOverviewTab" level="DEBUG"/>
    <logger name="org.eclipse.jetty" level="INFO"/>

</configuration>
