Commit 7c35c51a authored by HotaruYS's avatar HotaruYS Committed by GitHub
Browse files

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`
parent 3a5503de
<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>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment