<configuration scan="true" scanPeriod="5 seconds">
  <timestamp key="bySecond" datePattern="yyyy-MM-dd_HH-mm-ss"/>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>[%highlight(%5level)] %logger{35} - %msg%n</pattern>
    </encoder>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>INFO</level>
    </filter>
  </appender>

  <appender name="FILE-DEBUG" class="ch.qos.logback.core.FileAppender">
    <file>logs/pslogin-debug_${bySecond}.log</file>
    <encoder>
      <pattern>%date{ISO8601} %5level "%X" %logger{35} - %msg%n</pattern>
    </encoder>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>DEBUG</level>
    </filter>
  </appender>

  <appender name="FILE-TRACE" class="ch.qos.logback.core.FileAppender">
    <file>logs/pslogin-trace_${bySecond}.log</file>
    <encoder>
      <pattern>%date{ISO8601} [%thread] %5level "%X" %logger{35} - %msg%n</pattern>
    </encoder>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>OFF</level>
      <!--<level>TRACE</level>-->
    </filter>
  </appender>

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

  <!-- Logger specific overrides -->
  <logger name="com.github.mauricio.async" level="OFF"/>
  <logger name="oshi" level="OFF"/>
</configuration>
