logback.xml 921 Bytes
Newer Older
Melledy's avatar
Melledy committed
1
<Configuration>
2
3
  <variable name="LOG_LEVEL" value="${LOG_LEVEL:-INFO}" />

4
  <appender name="STDOUT" class="emu.grasscutter.utils.JlineLogbackAppender">
Melledy's avatar
Melledy committed
5
    <encoder>
KingRainbow44's avatar
KingRainbow44 committed
6
      <pattern>[%d{HH:mm:ss}] [%highlight(%level)] %msg%n</pattern>
Melledy's avatar
Melledy committed
7
8
    </encoder>
  </appender>
Benjamin Elsdon's avatar
Benjamin Elsdon committed
9
10
11
12
13
14
15
16
17
18
  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>logs/latest.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <fileNamePattern>logs/log.%d{yyyy-MM-dd}_%d{HH}.log.tar.gz</fileNamePattern>
      <maxHistory>24</maxHistory>
    </rollingPolicy>
    <encoder>
      <pattern>%d{yyyy-MM-dd'T'HH:mm:ss'Z'} - %m%n</pattern>
    </encoder>
  </appender>
19
20
21
22

  <logger name="org.reflections" level="OFF" />
  <logger name="emu.grasscutter" level="${LOG_LEVEL}" />

Melledy's avatar
Melledy committed
23
24
  <root level="INFO">
    <appender-ref ref="STDOUT" />
Benjamin Elsdon's avatar
Benjamin Elsdon committed
25
    <appender-ref ref="FILE" />
Melledy's avatar
Melledy committed
26
27
  </root>
</Configuration>