trafficcontrol
trafficcontrol copied to clipboard
TR should not rename/recreate log files on rollover
This Improvement request (usability, performance, tech debt, etc.) affects these Traffic Control components:
- Traffic Router
Current behavior:
The current log4j2 config causes TR to rename access.log to access.log.2022-01-30-30 (for example) then recreate the access.log file. This can cause data loss problems for log forwarding tools that expect to tail the same log file without having it change out from underneath them.
New behavior:
TR's log4j2.xml config should use a rollover strategy that doesn't cause the log file to be renamed then recreated. I think this can be accomplished with a DirectWriteRolloverStrategy which is documented here. However, in order to limit the number of rolled-over log files on disk, we may need to combine that with a custom delete action which is documented here.