1 .\"Copyright (c) 2004-2011 Apple Inc. All rights reserved.
3 .\"@APPLE_LICENSE_HEADER_START@
5 .\"This file contains Original Code and/or Modifications of Original Code
6 .\"as defined in and that are subject to the Apple Public Source License
7 .\"Version 2.0 (the 'License'). You may not use this file except in
8 .\"compliance with the License. Please obtain a copy of the License at
9 .\"http://www.opensource.apple.com/apsl/ and read it before using this
12 .\"The Original Code and all software distributed under the License are
13 .\"distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 .\"EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 .\"INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 .\"FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
17 .\"Please see the License for the specific language governing rights and
18 .\"limitations under the License.
20 .\"@APPLE_LICENSE_HEADER_END@
27 .Nd configuration file for
36 file at startup, and re-reads the file whenever it received a HUP signal.
39 daemon reads the file when it starts.
40 See the ASLMANAGER PARAMETER SETTINGS section below for details on those parameter settings.
42 The file may contain parameter settings, used in place of (and which will override) command-line options,
43 and may contain query-action rules that trigger specific actions when
45 receives messages that match the query pattern.
47 Parameter setting lines in the configuration file begin with an equal sign
49 and are generally of the form:
51 .Dl = parameter_name value ...
53 Most parameter settings require a single value, although some may take several values.
54 See the PARAMETER SETTINGS section below for details.
56 Query-action rules in the file begin with a question-mark ``?'' or a
58 and generally have the form:
60 .Dl ? query action ...
62 Specific actions may be followed by optional arguments.
63 See the QUERY-ACTION RULES section below for details.
64 .Sh PARAMETER SETTINGS
65 The following parameter-settings are recognized by
68 .Bl -tag -width "bsd_max_dup_time" -compact -offset indent
70 Enables or disables internal debugging output.
71 This is probably of little interest to most users.
72 The debug parameter requires a value of
74 to enable debug output, or a value of
77 An option file name may follow the
81 If a file name is provided, debug messages are written to that file.
82 Otherwise, debug writes are treated as log messages.
85 Sets the time interval for the mark facility.
86 The default is 0 seconds, which indicates that mark messages are not generated.
89 Sets the maximum time before writing a
90 .Dq "last message repeated <N> times"
91 message in a log file when duplicate messages have been detected.
92 The default is 30 seconds.
95 Sets the time-to-live for messages used by the utmp, wtmp, and lastlog subsystems.
96 The default is 31622400 seconds (approximately 1 year).
99 Sets the per-process message per second quota.
100 The default is value is 500.
101 A value of 0 disables the quota mechanism.
104 Sets the maximum file size for individual files in the ASL data store.
105 The default is 25600000 bytes.
108 .Sh QUERY-ACTION RULES
109 Rules contain three components: a query; an action; and optionally, parameters specific to that action.
112 .Dl ? [= Sender foobar] [<= Level error] notify com.apple.foobar
115 Queries comprise one or more message matching components, each of which has the form:
119 OP is a comparison operator.
120 It can have the following values:
122 .Bl -tag -width "<= " -compact -offset indent
124 true (always matches)
132 greater than or equal to
136 less than or equal to
139 It can also be preceded by one or more modifiers:
140 .Bl -tag -width "C " -compact -offset indent
154 KEY and VAL are message keys and values.
157 .Dl [= Sender foobar]
159 matches any message with value
168 matches any message with a value beginning with the letters GR, Gr, gr, or gR
169 (C meaning casefold, A meaning prefix) for the
172 The example query above,
174 .Dl [= Sender foobar] [N< Level 3]
176 matches any message from
178 with a level numerically less than 3
179 (string values are converted to integers, and the comparison is done on the integer values).
180 Note that the string values may be used equivalently for the Level key,
181 so the example above may also be written as:
183 .Dl [= Sender foobar] [< Level Error]
185 String values for levels may be any of the set
194 These strings may be upper, lower, or mixed case.
198 operator is useful to test for the presence of a particular key.
202 Will match any message that has a
204 key, regardless of its value.
207 The following actions are available.
209 .Bl -tag -width "store_directory" -compact -offset indent
213 to post a notification with
215 The notification key must appear as a single parameter following the
220 Sets read access controls for messages that match the associated query pattern.
222 will restrict read access to matching messages to a specific user and group.
223 The user ID number and group ID number must follow the
225 keyword as parameters.
230 to save matching messages, either in the main ASL data store,
231 or in a separate log message data store file is a file name is given as a parameter.
232 A separate data store file may be accessed using the
234 command line utility.
235 A new file will be created if one does not exist.
236 If a new file is being created, the UID, GID, and mode of the file may be specified using the options
241 where UUU and GGG are a user ID and group ID, and MMMM is a
242 mode specification of the form
244 with a leading zero for an octal number or DDD for a decimal number.
246 Two other optional parameters may also follow the pathname.
248 If a separate log message data store file is specified as a parameter, then
250 will open the database, save a matching message, and then close the database.
251 If a high volume of messages is expected, specifying the
253 option will improve performance.
255 Also, if a separate log message data store file is specified as a parameter,
256 matching messages will be excluded from all further processing.
259 option will cause syslogd to save matching messages in the specified store file
260 and then continue processing matching messages in accordance with the actions
261 specified in /etc/asl.conf and /etc/syslog.conf.
265 configuration file contains no matching rules for the main ASL data store, then
267 will save all messages.
270 Causes matching messages to be stored in a log message data store file in a separate directory.
271 The directory path name must follow as the first parameter.
272 The named directory must exist.
274 will not create the directory path.
276 Messages saved to a store directory are saved in files that are named
283 are the year, month (01 to 12) and day of the month (01 to 31) associated with
285 This has the effect of saving messages in a separate file for each day.
293 options available for the
296 may also be specified for a store directory.
297 The uid, gid, and mode specification will be used when the individual daily store files are created.
300 Causes matching messages to be stored in a log file.
301 The file's path name must follow as the first parameter.
302 The file's directory must exist.
303 If the path already exists, it must be a plain file.
306 will create the file.
307 The file's owner will be root, and the file's group will be admin.
308 A file mode may be specified as an option of the form
311 One or more UIDs may be given as the values of options of the form
313 One or more GIDs may be given as the values of options of the form
315 If any UIDs or GIDs are provided, the specified users and groups will be given read access to the file.
316 Note that UIDs and GIDs should be defined in the local Open Directory database, since
318 starts and may create the log file before network directory services are available.
319 Unknown UIDs and GIDs will be ignored when setting access controls.
321 By default, log files will be written using the same format used for printing by
326 A print format may be specified as the value of the
331 Alternate file formats, including
336 Custom formats may be specified as well, using the syntax supported by
338 Space and tab character in a custom format string must be escaped with a leading backslash character.
339 Custom format strings may include variables of the form
344 which will be expanded to the associated with the named key.
345 The first form may be used in most cases.
346 The second form may be used if the variable is not delimited by whitespace.
347 The third form permits the selection of alternate output formats for certain keys,
348 such as Time and Level.
353 For example, the option:
355 .Dl format=$((Time)(Z))\ $Host\ $(Sender)[$(PID)]\ <$((Level)(str))>:\ $Message
357 produces output similar to the
359 format, but using the UTC (Zulu) timezone.
361 By default, files printed using the
365 formats will suppress printing duplicates.
366 If two or more messages are logged within 30 seconds, and which differ only in time,
367 then the second and subsequent messages will not be printed.
368 When a different message is logged, or 30 seconds have elapsed since the initial
369 message was logged, a line with the text
370 .Dl --- last message repeated N times ---
371 will be added to the file.
372 The default may be disabled using the
377 Causes syslogd to write the text of matching messages to all terminal windows.
378 If optional text follows the
380 keyword, then that text is written rather that the matching message text.
383 Causes a matching message to be ignored in all subsequent matching rules.
385 .Sh ASLMANAGER PARAMETER SETTINGS
386 The following parameter-settings are recognized by
389 .Bl -tag -width "aslmanager_debug" -compact -offset indent
391 Enables or disables internal debugging output.
392 This is probably of little interest to most users.
393 The debug parameter requires a value of
395 to enable debug output, or a value of
398 Debug messages are sent to
402 Sets the time-to-live in days for messages in the syslog data store.
403 The default is 7 days.
406 Sets the maximum size for for the ASL data store.
407 The default is 150000000 bytes.
410 Enables or disables archiving.
411 The archive parameter requires a value of
413 to enable archiving, or a value of
416 An option archive directory path may follow the
420 If enabled, files removed from the ASL data store are moved to the archive directory.
421 The default archive directory path is /var/log/asl.archive.
424 The data store path used by
426 The default is /var/log/asl.
427 Note that this parameter is ignored by
430 Files copied to the archive will be given the specified access mode.
431 The default is 0400, so archive files will only be readable by root.