Last active
September 17, 2021 10:08
-
-
Save maruohon/7290185 to your computer and use it in GitHub Desktop.
Minecraft server logging configuration file for Minecraft 1.7.2+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration> | |
<Appenders> | |
<File name="legacy_server_log" fileName="server.log"> | |
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" /> | |
</File> | |
<Console name="console" target="SYSTEM_OUT"> | |
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" /> | |
</Console> | |
<RollingFile name="rolling_server_log" fileName="logs/server.log" | |
filePattern="logs/server_%d{yyyy-MM-dd}.log"> | |
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" /> | |
<Policies> | |
<TimeBasedTriggeringPolicy /> | |
</Policies> | |
</RollingFile> | |
</Appenders> | |
<Loggers> | |
<Root level="info"> | |
<!-- <AppenderRef ref="rolling_server_log" /> --> | |
<AppenderRef ref="legacy_server_log" /> | |
<AppenderRef ref="console" /> | |
</Root> | |
</Loggers> | |
</Configuration> |
Thank you for this! I've been looking for a way to control Forge logging for some time.
sooo confused xD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I love my logs to be at one place, but it turns out, adding that option "-Dlog4j.configurationFile=log4j2.xml" makes my server eat 100%+ CPU time on empty and idle server. Do you have any idea why?
Its on Linux laptop 3.12.2-1-ARCH x86_64 GNU/Linux
and also on
Linux Ubuntu 2.6.35-22-server x86_64 x86_64 x86_64 GNU/Linux
Best regards
EDIT:
Well, https://gist.github.com/EvilSeph/7909975 works fine for me. Maybe I edited badly your xml, maybe not.