-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Pelican Service:
- Client
- Plugin
- Registry
- Director
- Origin
- Cache
- Other (please give the detail)
Currently log rotation (using logrotate) requires the copytruncate method, wherein a rotation is performed by copying the log file, then truncating the original. The downside to this is that if the log file suddenly grows to be at least half of the log volume, you can no longer rotate it (because you don't have enough room to make a copy). Since you can't rotate it, the original will just keep getting bigger until it fills up the volume.
A better way to do it is for logrotate to rename the file, then tell the daemon to close the file and open a new logfile (with the old name). This is usually done with Unix signals, typically SIGHUP or SIGUSR1.
Add a mechanism by which logrotate can tell Pelican to close and reopen the log file.