I've been curious about something for a while. Thought I'd ask about it. I redirect my periodic emails to log files instead with the following in /etc/periodic.conf
This works great. Except with the standard /etc/newsyslog.conf settings it appears that the weekly.log always has in it that the logfile has turned over due to size>1K. In the newsyslog.conf it has this line:
Now to me that 1 should be a * shouldn't it? As it is a weekly log file you want it to rotate weekly, not when it's above 1K in size surely? The daily and monthly lines have a * for size. So is that a mistake, or am I missing something here? I've changed mine to a * and then it behaves as expected and rotates weekly based on the when specification rather than the size.
Code:
daily_output="/var/log/daily.log"
weekly_output="/var/log/weekly.log"
monthly_output="/var/log/monthly.log"
daily_status_security_inline="YES"
This works great. Except with the standard /etc/newsyslog.conf settings it appears that the weekly.log always has in it that the logfile has turned over due to size>1K. In the newsyslog.conf it has this line:
Code:
# logfilename [owner] mode count size when flags [/pid_file] [sig_num]
/var/log/weekly.log 640 5 1 $W6D0 JN
Now to me that 1 should be a * shouldn't it? As it is a weekly log file you want it to rotate weekly, not when it's above 1K in size surely? The daily and monthly lines have a * for size. So is that a mistake, or am I missing something here? I've changed mine to a * and then it behaves as expected and rotates weekly based on the when specification rather than the size.