Apple Mac OS X Server Network Card User Manual


 
282 Chapter 17 Configuring System Logging
The facility and priority are separated by a single period, and these are separated from
the action by one or more tabs. Wildcards (“*”) may also be used in the configuration
file. The following example line logs all messages of any facility or priority to the file
/var/log/all.log:
*.* /var/log/all.log
See the syslog.conf man page for information about the configuration of this file.
Local Logging
The default configuration in /etc/syslog.conf is appropriate for a Mac OS X Server
system if a remote log server is not available. The computer is set to rotate log files
using a cron job at the time intervals specified in the file /etc/crontab. Rotation entails
compressing the current log file, incrementing the integer in the filename of
compressed log files, and creating a new log file for new messages. For example, the
following files were created in the /var/log/ folder:
system.log
system.log.0.gz
system.log.1.gz
system.log.2.gz
system.log.3.gz
system.log.4.gz
The log files are rotated by a cron job, and the rotation will only occur if the computer
is on when the job is scheduled. By default, the log rotation tasks are scheduled for
very early in the morning (for example, 4:30 a.m. on Saturday) in order to be as
unobtrusive as possible. If the computer will not be on at this time, adjust the settings
in /etc/crontab.
For example, the following line shows the default for running the weekly log rotation
script, which is configured for 4:15 a.m. on the last day of the week, Saturday (Sunday is
0). An asterisk denotes “any,” so a line of all asterisks would execute every minute.
DayOf DayOf
#Minute Hour Month Month Week User Command
15 4 * * 6 root periodic weekly
The following line would change the time to 12:15 p.m. on Tuesday, when the computer
is much more likely to be on:
DayOf DayOf
#Minute Hour Month Month Week User Command
15 12 * * 2 root periodic weekly
See the crontab man page for more information about editing the /etc/crontab file.