<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Auto-CreamAPI
  ~ Copyright (C) 2020 Jeddunk
  ~
  ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
  ~ License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
  ~ version.
  ~
  ~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  ~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License along with this program. If not, see
  ~ <https://www.gnu.org/licenses/>.
  -->

<configuration>

    <property name="PATTERN" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} - %msg%n"/>

    <!-- Insert the current time formatted as "yyyyMMdd'T'HHmmss" under
       the key "bySecond" into the logger context. This value will be
       available to all subsequent configuration elements. -->
    <timestamp key="bySecond" datePattern="yyyy'_'MM'_'dd'-'HH'_'mm'_'ss"/>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <!--withJansi>true</withJansi-->
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>${PATTERN}</pattern>
        </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
        <!-- use the previously created timestamp to create a uniquely
             named log file -->
        <file>autocreamapi_${bySecond}.log</file>
        <encoder>
            <pattern>${PATTERN}</pattern>
        </encoder>
    </appender>


    <logger name="com.base22" level="TRACE"/>


    <root level="debug">
        <appender-ref ref="STDOUT" />
        <appender-ref ref="FILE" />
    </root>
</configuration>