Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
1.2.3
-
Windows 10 64bit
org.slf4j:slf4j-api:1.7.25
ch.qos.logback:logback-classic:1.2.3
Description
RollingFileAppender when used with SizeAndTimeBasedRollingPolicy disards during log rotation first file that should have been archived. This happens only if file rotates by time before first rotating by size
Attached is app that simply does some info and debug logging and logback config file that logs everything to one file and info to other. Logs rotate at 100kB or after a minute. fast log keeps exceeding file size limit so it is archived properly. slow log does not exceed the file size limit and when minute changes it simply gets deleted and starts fresh. With next minute change it is properly archived though.
Since log rotation is usually set for a day this can mean loss of day worth of logging.