<configuration debug="false">
    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file><%= @pt_puppetdb_access_log %>.log</file>
        <append>true</append>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern><%= @pt_puppetdb_access_log %>-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
            <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
            <maxFileSize><%= @pt_logging_max_file_size %></maxFileSize>
            <maxHistory><%= @pt_loging_max_history %></maxHistory>
            <totalSizeCap><%= @pt_logging_total_size %></totalSizeCap>
        </rollingPolicy>
        <encoder>
            <pattern>%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" %D</pattern>
        </encoder>
    </appender>
    <appender-ref ref="FILE" />
</configuration>
