logrotate reimplementation using inotify for event based log rotation
BSD-3-CLAUSE License
logrotate reimplementation using inotify for event based log rotation
Simply point logrustate at your logs using the following invocation:
logrustate -f ONE_LOG_FILE -f ANOTHER_LOG_FILE -f AND_ANOTHER -s SIZE_OF_PRESERVED_LOGS -n NUMBER_OF_OLD_LOGS
Two important notes:
mmap
ed to the process's address space and chunks of size SIZE_OF_PRESERVED_LOGS
arefallocate
. This absolutely requires O_APPEND
opened log files or there will befallocate
syscall, log size must be a multiple of 4096.