Grasscutter/src/main/resources/logback.xml

40 lines
1.3 KiB
XML
Raw Normal View History

2022-04-17 20:43:07 +08:00
<Configuration>
<variable name="LOG_LEVEL" value="${LOG_LEVEL:-INFO}" />
<appender name="STDOUT" class="emu.grasscutter.utils.JlineLogbackAppender">
2022-04-17 20:43:07 +08:00
<encoder>
<pattern>%d{HH:mm:ss} &lt;%highlight(%level):%gray(%class{0})&gt; %msg%n</pattern>
2022-04-17 20:43:07 +08:00
</encoder>
</appender>
2022-06-27 01:03:10 +08:00
2022-04-22 13:05:06 +08:00
<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.gz</fileNamePattern>
2022-04-22 13:05:06 +08:00
<maxHistory>24</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd'T'HH:mm:ss'Z'} &lt;%level:%class&gt; %m%n</pattern>
2022-04-22 13:05:06 +08:00
</encoder>
</appender>
2022-06-27 01:03:10 +08:00
<appender name="SERVEREVENT" class="emu.grasscutter.utils.ServerLogEventAppender">
<encoder>
<pattern>%d{HH:mm:ss} &lt;%highlight(%level):%gray(%class{0})&gt; %msg%n</pattern>
</encoder>
</appender>
2022-06-27 01:03:10 +08:00
<logger name="express" level="OFF" />
<logger name="org.quartz" level="OFF" />
<logger name="org.reflections" level="OFF" />
2022-06-27 01:03:10 +08:00
<logger name="org.eclipse.jetty" level="OFF" />
<logger name="emu.grasscutter" level="${LOG_LEVEL}" />
2022-04-17 20:43:07 +08:00
<root level="INFO">
<appender-ref ref="STDOUT" />
2022-04-22 13:05:06 +08:00
<appender-ref ref="FILE" />
<appender-ref ref="SERVEREVENT" />
2022-04-17 20:43:07 +08:00
</root>
</Configuration>