logback.xml 959 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>
6
      <pattern>%d{HH:mm:ss} &lt;%highlight(%level):%gray(%class{0})&gt; %msg%n</pattern>
Melledy's avatar
Melledy committed
7
8
    </encoder>
  </appender>
Benjamin Elsdon's avatar
Benjamin Elsdon committed
9
10
11
  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>logs/latest.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
12
      <fileNamePattern>logs/log.%d{yyyy-MM-dd}_%d{HH}.log.gz</fileNamePattern>
Benjamin Elsdon's avatar
Benjamin Elsdon committed
13
14
15
      <maxHistory>24</maxHistory>
    </rollingPolicy>
    <encoder>
16
      <pattern>%d{yyyy-MM-dd'T'HH:mm:ss'Z'} &lt;%level:%class&gt; %m%n</pattern>
Benjamin Elsdon's avatar
Benjamin Elsdon committed
17
18
    </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
  </root>
27
</Configuration>