Forked from johncarney/newsyslog-for-your-project.conf
Created
March 1, 2024 22:14
-
-
Save arbal/78f48cad8f0b5150a7a2863d77fb351f to your computer and use it in GitHub Desktop.
Example newsyslog configuration for rotating Rails log files on Mac OS X.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] | |
/Users/your-username/path-your-rails-project/log/*.log your-username:staff 644 4 * $D0 GJ | |
# NOTES | |
# | |
# Place file in /etc/newsyslog.d | |
# '$D0' under 'when' tells newsyslog to rotate logs daily at midnight. | |
# Alternatively you could use '24' for 'when', which would specify "every 24 hours" | |
# '*' under 'size' specifies that logs should be rotated regardless of their size. | |
# 'G' under 'flags' tells newsyslog that the 'logfilename' is a pattern and it should rotate all log files matching the pattern. | |
# 'J' under 'flags' specifies that rotated logs should be compressed using bzip2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment