Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.1.7
-
None
Description
Sometimes (not every day) when rolling over log files logback cannot compress tmp file because the destination already exists:
nov. 14 14:43:01 med2 java[4564]: 14:43:01,670 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/USR/newtprod/vertx/logs/vertx.log] to [/USR/newtprod/vertx/logs/vertx.log611680730975582.tmp] nov. 14 14:43:01 med2 java[4564]: 14:43:01,672 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - GZ compressing [/USR/newtprod/vertx/logs/vertx.log611680730975582.tmp] as [/USR/newtprod/vertx/logs/backup/2016-11-13/vertx-2016-11-13.0.log.gz] nov. 14 14:43:01 med2 java[4564]: 14:43:01,674 |-INFO in c.q.l.core.rolling.helper.TimeBasedArchiveRemover - deleting /USR/newtprod/vertx/logs/backup/2016-10-14/vertx-2016-10-14.0.log.gz nov. 14 14:43:01 med2 java[4564]: 14:43:01,674 |-INFO in c.q.l.core.rolling.helper.TimeBasedArchiveRemover - deleting folder [/USR/newtprod/vertx/logs/backup/2016-10-14] nov. 14 16:20:02 med2 java[4564]: 16:20:02,283 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/USR/newtprod/vertx/logs/vertx.log] to [/USR/newtprod/vertx/logs/vertx.log617501343575225.tmp] nov. 14 16:20:02 med2 java[4564]: 16:20:02,288 |-WARN in ch.qos.logback.core.rolling.helper.Compressor - The target compressed file named [/USR/newtprod/vertx/logs/backup/2016-11-13/vertx-2016-11-13.0.log.gz] exist already. Aborting file compression.
I'm opening a new issue because I'm using v1.1.7 and all the older ones seem to have been fixed in 1.1.5.
I'm using %d and %i in my fileNamePattern:
<fileNamePattern> &LOG_DIR;/backup/%d{&DATE_PATTERN;,aux}/&APP_NAME;-%d{&DATE_PATTERN;}.%i.log.gz </fileNamePattern>
Please find attached the full logback.xml.