Created
April 19, 2016 15:56
-
-
Save hartfordfive/40127952391818930649f3f5b5cd77e1 to your computer and use it in GitHub Desktop.
Example newsyslog configuration
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.apple.newsyslog</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/sbin/newsyslog</string> | |
</array> | |
<key>LowPriorityIO</key> | |
<true/> | |
<key>Nice</key> | |
<integer>1</integer> | |
<key>StartCalendarInterval</key> | |
<dict> | |
<key>Minute</key> | |
<integer>30</integer> | |
</dict> | |
</dict> | |
</plist> |
This file contains hidden or 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
# truncate rails logs whenever they are larger than 1mb | |
# | |
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] | |
/Users/bm5k/src/**/**/log/*.log bm5k:staff 644 0 1000 * G | |
/Users/bm5k/src/**/**/spec/dummy/log/*.log bm5k:staff 644 0 1000 * G |
This file contains hidden or 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
# truncate rails logs every day at midnight, keep 7 previous logs, compress previous logs | |
# | |
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] | |
/Users/deploy/app/**/shared/log/*.log deploy:staff 644 7 * $D0 GZ /var/run/httpd.pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment