Skip to content

Instantly share code, notes, and snippets.

@alekssamos
Forked from glarrain/supervisor
Created July 25, 2022 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alekssamos/c14cd7da903350d862d16dc48d1b56a6 to your computer and use it in GitHub Desktop.
Save alekssamos/c14cd7da903350d862d16dc48d1b56a6 to your computer and use it in GitHub Desktop.
logrotate.d/supervisor: config file for logrotate for Supervisor logs (includes explanation of each directive)
/var/log/supervisor/*.log {
weekly
rotate 52
compress
delaycompress
notifempty
missingok
copytruncate
}
# -Log files are rotated weekly
# -Log files are rotated 52 times before being removed
# -Log files will be compressed
# -Log files compression will have a delay of one rotation cycle
# -Do not rotate the log if it is empty
# -If the log file is missing, go on to the next one without issuing an error message
# -Truncate the original log file to zero size in place after creating a copy,
# instead of moving the old log file and optionally creating a new one.
# It can be used when some program cannot be told to close its logfile
# and thus might continue writing (appending) to the previous log file forever
#
# **Note that there is a very small time slice between copying the file and
# truncating it, so some logging data might be lost**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment