1 .\"Copyright (c) 2004-2009 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 recieves messages that match the query pattern.
47 Parameter setting lines in the configuration file begin with an equal sign ("="),
48 and are generally of the form:
50 .Dl = parameter_name value ...
52 Most parameter settings require a single value, although some may take several values.
53 See the PARAMETER SETTINGS section below for details.
55 Query-action rules in the file begin with a question-mark ("?") or a "Q", and generally have the form:
57 .Dl ? query action ...
59 Specific actions may be followed by optional arguments.
60 See the QUERY-ACTION RULES section below for details.
61 .Sh PARAMETER SETTINGS
62 The following parameter-settings are recognized by
65 .Bl -tag -width "bsd_max_dup_time" -compact -offset indent
67 Enables or disables internal debugging output.
68 This is probably of little interest to most users.
69 The debug parameter requires a value of "1" to enable debug output, or a value of "0" to disable it.
70 An option file name may follow the "0" or "1".
71 If a file name is provided, debug messages are written to that file.
72 Otherwise, debug writes are treated as log messages.
75 Sets the ASL data store cutoff level, given as an integer in the range 0 to 7 as an argument.
76 The cutoff level is 7 by default, allowing any message that matches a "store" action
77 (see QUERY-ACTION RULES below) to be saved.
78 Setting the cutoff to a lower value will prevent messages with log priority levels numerically
79 greater that the specified cutoff from being saved in the ASL data store.
82 Sets the time interval for the mark facility.
83 The default is 0 seconds, which indicates that mark messages are not generated.
86 Sets the maximum time that the bsd_out module will allow before writing a "last message repeated <N> times"
87 message in a log file specified in /etc/syslog.conf.
88 The default is 30 seconds.
91 Sets the time-to-live for messages used by the utmp, wtmp, and lastlog subsystems.
92 The default is 31622400 seconds (approximately 1 year).
95 Sets the time-to-live for filesystem error messages generated by the kernel.
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 key="Sender" and val="foobar".
164 matches any message with key=Color and val beginning with the letters GR, Gr, gr, or gR
165 (C meaning casefold, A meaning prefix).
166 The example query above,
168 .Dl [= Sender foobar] [N< Level 3]
170 matches any message from "foobar" with a level numerically less than 3
171 (string values are converted to integers, and the comparison is done on the integer values).
172 Note that the string values may be used equivalently for the Level key,
173 so the example above may also be written as:
175 .Dl [= Sender foobar] [< Level Error]
177 String values for levels may be any of the set "emergency", "alert", "critical", "error",
178 "warning", "notice", "info", or "debug". These strings may be upper, lower, or mixed case.
180 The "T" operator is useful to test for the presence of a particular key.
184 Will match any message that has a "Flavor" key, regardless of its value.
187 The following actions are available.
189 .Bl -tag -width "store_directory" -compact -offset indent
193 to post a notification with
195 The notification key must appear as a single parameter following the "notify" action.
198 Sets read access controls for messages that match the associated query pattern.
200 will restrict read access to matching messages to a specific user and group.
201 The user ID number and group ID number must follow the "access" keyword as parameters.
206 to save matching messages, either in the main ASL data store,
207 or in a separate log message data store file is a file name is given as a parameter.
208 A separate data store file may be accessed using the
210 command line utility.
211 A new file will be created if one does not exist.
212 If a new file is being created, the UID, GID, and mode of the file may be specified using the options
213 "uid=UUU", "gid=GGG", and "mode=MMMM", where UUU and GGG are a user ID and group ID, and MMMM is a
214 mode specification of the form "0644" (for an octal number) or DDD for a decimal number.
216 Two other optional parameters may also follow the pathname.
220 will open the database, save a matching message, and then close the database.
221 If a high volume of messages is expected, specifying the "stayopen" option will improve performance.
223 Specifying "exclude_asldb" will cause syslogd to save matching messages in the specificed file,
224 but exclude them from the main ASL data store.
226 Note that if the configuration file contains no matching rules for the ASL data store, then
228 will save all messages, subject to filtering in accordance with the log cutoff level.
231 Causes matching messages to be stored in a log message data store file in a separate directory.
232 The directory path name must follow as the first parameter.
233 The named directory must exist.
235 will not ceate the directory path.
237 Messages saved to a store directory are saved in files that are named "yyyy.mm.dd.asl",
238 where "yyyy", "mm", and "dd" are the year, month (01 to 12) and day of the month (01 to 31) associated with
240 This has the effect of saving messages in a separate file for each day.
242 The "exclude_asldb", "uid=UUU", "gid=GGG", and "mode=MMMM" options available for the "store" action
243 may also be specified for a store directory.
244 The uid, gid, and mode specification will be used when the individual daily store files are created.
247 Causes syslogd to write the text of matching messages to all terminal windows.
248 If optional text follows the "broadcast" keyword, then that text is written rather that the matching message text.
251 Causes a matching message to be ignored in all subsequent matching rules.
253 .Sh ASLMANAGER PARAMETER SETTINGS
254 The following parameter-settings are recognized by
257 .Bl -tag -width "aslmanager_debug" -compact -offset indent
259 Enables or disables internal debugging output.
260 This is probably of little interest to most users.
261 The debug parameter requires a value of "1" to enable debug output, or a value of "0" to disable it.
262 Debug messages are sent to
266 Sets the time-to-live in days for messages in the syslog data store.
267 The default is 7 days.
270 Sets the maximum size for for the ASL data store.
271 The default is 150000000 bytes.
274 Enables or disables archiving.
275 The archive parameter requires a value of "1" to enable archiving, or a value of "0" to disable it.
276 An option archive directory path may follow the "0" or "1".
277 If enabled, files removed from the ASL data store are moved to the archive directory.
278 The default archive directory path is /var/log/asl.archive.
281 The data store path used by
283 The default is /var/log/asl.
284 Note that this parameter is ignored by
287 Files copied to the archive will be given the specified access mode.
288 The default is 0400, so archive files will only be readable by root.