Newsyslog typo?

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

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.
 
Sounds right

xtaz said:
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?
[snip]
I've changed mine to a * and then it behaves as expected and rotates weekly based on the when specification rather than the size.
From the looks of it you are correct.

Fonz
 
Hmmm. If that's the case I wonder if there are any developers on here who would notice this, or if I should post it on the mailing lists, or file a PR. Seems like it's something a bit too simple to file a PR for.
 
Back
Top