mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 20:56:28 +00:00
Override server logging level with environment variable (#653)
Use `LOG_LEVEL` environment variable to override logging level for `emu.grasscutter` (which also contains all loggers under it). This might help with debugging various issues reported by users. Previously, the only way to override these levels would be to use `-Dlogback.configurationFile`
This commit is contained in:
parent
3a5503de72
commit
7c35c51a6a
@ -1,4 +1,6 @@
|
||||
<Configuration>
|
||||
<variable name="LOG_LEVEL" value="${LOG_LEVEL:-INFO}" />
|
||||
|
||||
<appender name="STDOUT" class="emu.grasscutter.utils.JlineLogbackAppender">
|
||||
<encoder>
|
||||
<pattern>[%d{HH:mm:ss}] [%highlight(%level)] %msg%n</pattern>
|
||||
@ -14,11 +16,12 @@
|
||||
<pattern>%d{yyyy-MM-dd'T'HH:mm:ss'Z'} - %m%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<logger name="org.reflections" level="OFF"/>
|
||||
|
||||
<logger name="org.reflections" level="OFF" />
|
||||
<logger name="emu.grasscutter" level="${LOG_LEVEL}" />
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
<logger name="emu.grasscutter.scripts.ScriptLib" level="DEBUG">
|
||||
</logger>
|
||||
</Configuration>
|
Loading…
Reference in New Issue
Block a user