]> git.saurik.com Git - apple/syslog.git/blame - syslogd.tproj/asl.conf.5
syslog-64.tar.gz
[apple/syslog.git] / syslogd.tproj / asl.conf.5
CommitLineData
5dd30d76
A
1.Dd December 22, 2005
2.Dt asl.conf 5
3.Os "Mac OS X"
4.Sh NAME
5.Nm asl.conf
6.Nd configuration file for
7.Xr syslogd 8
8asl_action module.
9.Sh DESCRIPTION
10The
11.Xr syslogd 8
12server in Mac OS X includes a module that compares messages with a set of query patterns,
13and which performs various actions when messages match the query patterns.
14.Pp
15Each line in the file contains three components.
16The first is a query, the second is an action, and the third contains parameters specific to that action.
17For example:
18.Pp
19.Dl Q [= Sender foobar] [N< Level 3] notify com.apple.foobar
20.Pp
21.Ss Queries
22Queries start with the letter "Q" followed by whitespace.
23Following that are any number of message matching components, each of which has the form:
24.Pp
25.Dl [OP KEY VAL]
26.Pp
27OP is a comparison operator.
28It can have the following values:
29.Pp
30.Bl -tag -width "<= " -compact -offset indent
31.It T
32true (always matches)
33.It =
34equal
35.It !
36not equal
37.It >
38greater than
39.It >=
40greater than or equal to
41.It <
42less than
43.It <=
44less than or equal to
45.El
46.Pp
47It can also be preceded by one or more modifiers:
48.Bl -tag -width "C " -compact -offset indent
49.Pp
50.It C
51casefold
52.It N
53numeric comparison
54.It S
55substring
56.It A
57prefix
58.It Z
59suffix
60.El
61.Pp
62KEY and VAL are message keys and values.
63For example
64.Pp
65.Dl Q [= Sender foobar]
66.Pp
67matches any message with key="Sender" and val="foobar".
68The query
69.Pp
70.Dl Q [CA= Color gr]
71.Pp
72matches any message with key=Color and val beginning with the letters GR, Gr, gr, or gR
73(C meaning casefold, A meaning prefix).
74The example query above,
75.Pp
76.Dl Q [= Sender foobar] [N< Level 3]
77.Pp
78matches any message from "foobar" with a level numerically less than 3
79(string values are converted to integers, and the comparison is done on the integer values).
80.Pp
81The "T" operator is useful to test for the presence of a particular key.
82.Pp
83.Dl Q [T Flavor whatever]
84.Pp
85Will match any message that has a "Flavor" key, regardless of its value.
86.Pp
87.Ss Actions
88The "notify" action causes
89.Nm syslogd
90to post a notification with
91.Fn notify_post .
92The notification key must appear as a single parameter following the "notify" action.
93.Pp
94The "access" action sets read access controls for messages that match the associated query pattern.
95.Nm syslogd
96will restrict read access to matching messages to a specific user and group.
97The user ID number and group ID number must follow the "access" keyword as parameters.
98.Pp
99The "store" action saves matching messages in a separate log message database.
100The database may be accessed using the
101.Nm syslog
102command line utility.
103A database pathname must follow the "store" keyword.
104A new database will be created if one does not exist.
105Two optional parameters, "stayopen" and "exclude_asldb" may follow the database pathname.
106.Pp
107By default,
108.Nm syslogd
109will open the database, save a matching message, and then close the database.
110If a high volume of messages is expected, specifying "stayopen" will improve performance.
111.Pp
112Specifying "exclude_asldb" will cause syslogd to save matching messages in the database,
113but exclude them from the main
114.Nm syslogd
115database (/var/log/asl.db).
116.Sh SEE ALSO
117.Xr asl 3 ,
118.Xr notify 3 ,
119.Xr syslog 1 ,
120.Xr syslogd 8 .