Created
April 22, 2021 21:25
-
-
Save scones/9e44b1b08920b2a6c77394e62a04f543 to your computer and use it in GitHub Desktop.
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"?> | |
<!-- log4j2.xml - Example log4j configuration file | |
Place this file in the same directory as your server.jar, edit | |
to taste, and add -Dlog4j.configurationFile=log4j2.xml to your | |
server startup flags. | |
More log4j example configs can be found at | |
<http://logging.apache.org/log4j/2.x/manual/appenders.html>. | |
--> | |
<Configuration status="WARN" packages="net.minecraft,com.mojang"> | |
<Appenders> | |
<!-- DEFAULT APPENDERS --> | |
<!-- console logging - logs to stdout --> | |
<Console name="SysOut" target="SYSTEM_OUT"> | |
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" /> | |
</Console> | |
<!-- GUI logging - ignored if you use `java -jar server.jar nogui` --> | |
<Queue name="ServerGuiConsole"> | |
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" /> | |
</Queue> | |
<!-- file logging - stuff under the logs/ dir --> | |
<RollingRandomAccessFile name="File" fileName="logs/latest.log" | |
filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz"> | |
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" /> | |
<Policies> | |
<TimeBasedTriggeringPolicy /> | |
<OnStartupTriggeringPolicy /> | |
<!-- <SizeBasedTriggeringPolicy size="250 MB"/> --> | |
</Policies> | |
<!-- keep up to 20 files before removing them --> | |
<!-- <DefaultRolloverStrategy max="20"/> --> | |
</RollingRandomAccessFile> | |
<!-- EXAMPLE APPENDERS --> | |
<!-- legacy logging - logs to server.log --> | |
<File name="LegacyServerLog" fileName="server.log"> | |
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" /> | |
</File> | |
</Appenders> | |
<Loggers> | |
<Root level="error"> | |
<!-- DEFAULT LOGGERS --> | |
<filters> | |
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" | |
onMismatch="NEUTRAL" /> | |
</filters> | |
<AppenderRef ref="SysOut"/> | |
<AppenderRef ref="File"/> | |
<AppenderRef ref="ServerGuiConsole"/> | |
<!-- EXAMPLE LOGGERS --> | |
<!-- <AppenderRef ref="LegacyServerLog"/> --> | |
</Root> | |
</Loggers> | |
</Configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fix chunk border lag from using biome datapacks in minecraft by turning off logging.
add this file to your minecraft dir and add
-Dlog4j.configurationFile=log4j2.xml
to your launch variables