Top-Logic has a default log configuration file for Log4j2.
Log files are only filled up to a certain size and then "backed up". Only a certain amount (10) of backup files are kept. Older backup files are deleted.
When naming the backup files, an unexpected strategy is used: tl.main.log -> tl.main.10.log -> tl.main.9.log -> ...-> tl.main.1.log, i.e. if tl.main.log is full, tl.main.2.log will be renamed to tl.main.1.log (overwriting), tl.main.3.log will be renamed to tl.main.2.log (overwriting),...,tl.main.log will be renamed to tl.main.10.log (overwriting) and then tl.main.log will be recreated. I.e. tl.main.10.log is the newest backup file and tl.main.1.log is the oldest.
Intuitively, one would expect tl.main.1.log to be the newest backup file and tl.main.10.log to be oldest.
The default configuration file is changed to this.
Test
- Make changes until at least 2 backup files are created.
- Expectation: The file top-logic.main.1.log is newer than top-logic.main.2.log.