Why does Logback depends on filesystem modify time precision? What if somebody – for example accidentally – touches a log file? In case of SizeAndTimeBasedRollingPolicy the file name always contains the time and order info:
- fileNamePattern is mandatory,
- %d{<Java_format_string>} is mandatory inside fileNamePattern,
- %i is mandatory inside fileNamePattern.
When the total size cap is reached for a particular file name base, then the file name for deletion should be calculated by timestamp and order. The timestamp should be reconstructed from the file's name, the format string from the config should be used for this. Is there a particular reason for using the filesystem's attributes instead of the filename? |