Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Allow the system.log file to be rotated daily' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Allow the system.log file to be rotated daily
Authored by: chris_on_hints on Dec 19, '07 10:41:55AM
launchd is smart enough to run the daily, weekly and monthly scripts even if it was asleep at the normal time (ie middle of the night). However, the rotation of system logs (which used to be in the daily script) are now handled by newsyslog - and the default setup for this deamon is to only rotate the system.log at midnight (with a 30min leeway either side).

if your machine sleeps before 11.30pm and wakes after 12.30am, the log will NEVER be rotated.

My suggestion was to change the newsyslog configuration file to either rotate the log once it reaches a certain size (as robg has done) or to instruct it to rotate every 24 hours (as i have done).

Note - if you want to see what newsyslog is thinking, running the following command will give you a reason for rotation or skipping of each log:

sudo /usr/sbin/newsyslog -v

[ Reply to This | # ]