]>
Commit | Line | Data |
---|---|---|
cee18a41 AM |
1 | .TH initlog 8 "Sun Jan 24 1999" |
2 | .SH NAME | |
3 | initlog \- log messages and events to the system logger | |
4 | .SH SYNOPSIS | |
5 | .B initlog | |
de1fc6ce | 6 | [\-cefnpqrs] [\-\-cmd=ARG] [\-\-event=ARG] [\-\-facility=ARG] |
cee18a41 AM |
7 | [\-\-name=ARG] [\-\-priority=ARG] [\-\-run=ARG] [\-\-string=ARG] |
8 | .SH DESCRIPTION | |
9 | \fBinitlog\fR logs messages and events to the system logger. | |
de1fc6ce JR |
10 | It is mainly designed for use in init scripts. initlog |
11 | reads a configuration file | |
12 | .I /etc/initlog.conf | |
13 | by default, to determine its settings. Any line preceded with a | |
14 | .I # | |
15 | is a comment, and the following configuration directives | |
16 | are recognized: | |
17 | .TP | |
18 | .I facility <logging facility> | |
19 | Sets the default logging facility | |
20 | .TP | |
21 | .I priority <logging priority> | |
22 | Sets the default logging priority | |
23 | .TP | |
24 | .I ignore <regexp> | |
25 | Messages that match the regular expression will not be logged. | |
26 | .TP | |
27 | initlog behavior can also be configured by command-line options. | |
cee18a41 AM |
28 | |
29 | .SS OPTIONS | |
30 | .TP | |
31 | .I "\-c, \-\-cmd=[program]" | |
32 | Execute the specified program, logging anything output to | |
33 | stdout or stderr. | |
34 | .TP | |
35 | .I "\-e, \-\-event=[number]" | |
792fd7dc | 36 | Logs that the specified event happened. Used in conjuction |
cee18a41 | 37 | with \fB\-\-name\fR. Currently specified events are: |
792fd7dc AM |
38 | .PD 0 |
39 | .RS 8n | |
40 | .TP 3n | |
41 | .B 1 | |
42 | the action completed successfully | |
43 | .TP | |
44 | .B 2 | |
45 | the action failed | |
46 | .TP | |
47 | .B 3 | |
48 | the action was cancelled at user request | |
49 | .TP | |
50 | .B 4 | |
51 | the action failed due to the failure of a dependent action | |
52 | .RE | |
53 | .PD | |
cee18a41 AM |
54 | .TP |
55 | .I "\-f, \-\-facility=[facility]" | |
cee18a41 AM |
56 | Log at the specified syslog facility. The default |
57 | is \fBdaemon\fR (see syslog(3)). | |
58 | .TP | |
59 | .I "\-n, \-\-name=[string]" | |
60 | Log the event under the specified string, such as | |
61 | "inetd". | |
62 | .TP | |
63 | .I "\-p, \-\-priority=[priority]" | |
64 | Log at the specified syslog priority. The default | |
65 | is \fBnotice\fR (see syslog(3)). | |
66 | .TP | |
de1fc6ce JR |
67 | .I "\-q" |
68 | Do not print the program's output, unless it exits | |
69 | with a non-zero exit code. | |
70 | .TP | |
cee18a41 AM |
71 | .I "\-r, \-\-run=[program]" |
72 | Execute the specified program, with an open file | |
73 | descriptor so that the program can pass back | |
74 | commands to initlog. | |
75 | .TP | |
de1fc6ce | 76 | .I "\-s, \-\-string=[string]" |
cee18a41 | 77 | Log the specified string to the logger. |
de1fc6ce JR |
78 | .TP |
79 | .I "\-\-conf=[file]" | |
80 | Specifies an alternate configuration file. | |
81 | .SH FILES | |
82 | .I /etc/initlog.conf | |
cee18a41 AM |
83 | .SH "SEE ALSO" |
84 | syslog(3), logger(1) |