1 .\" Copyright (c) 2004 Apple Computer
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of Apple Computer nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd Apple System Log server
39 .Op Fl m Ar mark_interval
40 .Op Fl p Ar prune_days
41 .Op Fl c Ar log_cutoff
44 .Op Fl module_name Li {0|1}
48 server receives and processes log messages.
49 Several modules receive input messages through various channels,
50 including UNIX domain sockets associated with the
53 and kernel printf APIs,
54 and optionally from a UDP socket if the
58 The Apple System Log facility comprises the
65 The system supports structured and extensible messages,
66 permitting advanced message browsing and management through search APIs and
67 other components of the Apple system log facility.
69 Log messages are retained in a data store,
70 subject to pruning and input filtering as described below,
71 to simplify the task of locating log messages and to facilitate browsing and searching.
72 The data store is intended to become a replacement for the numerous log files that are currently
73 found in various locations on the system.
74 Those files will be phased out in future versions of Mac OS.
76 The following options are recognized:
77 .Bl -tag -width indent
82 The server stays attached to the controlling terminal and prints debugging messages.
87 to fork and have the child process become a daemon.
92 this is not normally required.
94 Set the number of minutes between
97 The default is 20 minutes.
100 facility is disabled if the setting is zero minutes.
103 saves log messages in a data store that may be searched using the
108 The data store is pruned daily by the /etc/daily cron job to keep it from growing without bound.
109 Since many systems are shut down overnight (when the daily cron job runs),
110 the data store is also pruned shortly after
112 starts up as the system boots.
113 By default, log messages in the data store that are more than 7 days old are removed.
116 overrides the default.
117 A setting of zero days disables pruning of the data store when
121 Sets a cutoff filter for log priorities for messages to be retained in the log message data store.
124 must be between 0 and 7, corresponding to log priorities LOG_EMERG or ASL_LEVEL_EMERG
125 and LOG_DEBUG or ASL_LEVEL_DEBUG as defined in the
130 Received messages with a priority or level value greater than the cutoff will not be saved in the data store.
131 The default filter will retain messages in the range 0 (Emergency) to 5 (Notice) inclusive.
133 Note that a this filter value may be adjusted while
137 command-line utility.
141 The filter may be adjusted using the
145 .Li sudo syslog -c syslogd -d
147 will set the filter to retain messages in the range 0 (Emergency) to 7 (Debug).
149 Specifies an alternate path for loading plug-in modules.
152 checks for plug-in modules in the directory /usr/lib/asl.
158 to act as a network log message receiver.
159 The server will receive messages on the standard
162 Note that this opens the server to potential denial-of-service attacks,
163 as a malicious remote sender can flood the server with messages.
166 option is equivalent to using the
171 The remaining options of the form
172 .Fl module_name Li {0|1}
173 may be used to disable (0) or enable (1) the action of several of
176 .Bl -tag -width "-asl_action"
180 module receives log messages on the UNIX domain socket associated with the
183 The module may be disabled using
185 The module is normally enabled.
189 module examines the stream of received log messages and acts upon them according to the rules specified
190 in the file /etc/asl.conf.
197 module receives log messages on the UNIX domain socket associated with the kernel logging API.
198 The module may be disabled using
200 The module is normally enabled.
204 module receives log messages on the UNIX domain socket associated with the
207 The module may be disabled using
209 The module is normally enabled.
213 module examines the stream of received log messages and acts upon them according to the rules specified
214 in the file /etc/syslog.conf.
218 This module exists for backward compatibility with previous
221 Apple encourages use of the
225 search APIs over the use of the log files that are specified in the /etc/syslog.conf file.
226 Future versions of Mac OS will move functions that are currently handled by the
234 module receives log messages on the UDP socket associated with the Internet syslog message protocol.
235 The module may be enabled using
237 The module is normally disabled.
238 This module may also be enabled using the
244 initializes its built-in modules and loads plug-ins during its start-up.
245 The data store is pruned approximately 5 minutes after startup.
248 reinitializes in response to a HUP signal.
250 .Bl -tag -width /var/run/syslog.pid -compact
251 .It Pa /etc/syslog.conf
252 bsd_out module configuration file
254 asl_action module configuration file
255 .It Pa /var/run/syslog.pid
260 domain datagram log socket
277 The Apple System Log facility was introduced in Mac OS X 10.4.