diff options
author | Pokechu22 <Pokechu022@gmail.com> | 2016-06-22 22:13:38 -0700 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-06-25 20:44:50 +1000 |
commit | f068c5e8439dd6b6998aa7cd8f376c8fdb9d11ad (patch) | |
tree | 8c806e4c7472be6f3da5d6b85c8fe0267d4ab720 /src/main/resources | |
parent | df75eebc2b7ca3b370eb265ee52bd5397c1194de (diff) | |
download | craftbukkit-f068c5e8439dd6b6998aa7cd8f376c8fdb9d11ad.tar craftbukkit-f068c5e8439dd6b6998aa7cd8f376c8fdb9d11ad.tar.gz craftbukkit-f068c5e8439dd6b6998aa7cd8f376c8fdb9d11ad.tar.lz craftbukkit-f068c5e8439dd6b6998aa7cd8f376c8fdb9d11ad.tar.xz craftbukkit-f068c5e8439dd6b6998aa7cd8f376c8fdb9d11ad.zip |
MC-100524: Fix log files getting overwritten
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.
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/log4j2.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 08d68aa8..4a5ca1eb 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -11,6 +11,7 @@ <TimeBasedTriggeringPolicy /> <OnStartupTriggeringPolicy /> </Policies> + <DefaultRolloverStrategy max="1000"/> </RollingRandomAccessFile> </Appenders> <Loggers> |