
https://bugs.mojang.com/browse/MC-100524 Log files were previously overwritten when more than 7 were created on the same day. This is caused by Log4J's default behavior with DefaultRolloverStrategy, which defaults to a max of 7. While a max of 1000 doesn't fully stop this problem from happening, for 1000 log files in a single day to be reached the server would have to restart faster than once every 1.5 minutes, which is unlikely to happen. So 1000 seems like a good limit. A higher max isn't used because when it gets higher, there are performance hits due to the way Log4J checks for the next file.
29 lines
1.1 KiB
XML
29 lines
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<Configuration status="WARN" packages="com.mojang.util">
|
|
<Appenders>
|
|
<Console name="WINDOWS_COMPAT" target="SYSTEM_OUT"></Console>
|
|
<Queue name="TerminalConsole">
|
|
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
|
|
</Queue>
|
|
<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 />
|
|
</Policies>
|
|
<DefaultRolloverStrategy max="1000"/>
|
|
</RollingRandomAccessFile>
|
|
</Appenders>
|
|
<Loggers>
|
|
<Root level="info">
|
|
<filters>
|
|
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
|
|
</filters>
|
|
<AppenderRef ref="WINDOWS_COMPAT"/>
|
|
<AppenderRef ref="File"/>
|
|
<AppenderRef ref="TerminalConsole"/>
|
|
</Root>
|
|
</Loggers>
|
|
</Configuration>
|
|
|