Commit | Line | Data |
---|---|---|
d9898ee8 | 1 | .\" <!-- $Id: courierlogger.sgml,v 1.9 2007/04/22 15:05:16 mrsam Exp $ --> |
2 | .\" <!-- Copyright 2004-2007 Double Precision, Inc. See COPYING for --> | |
3 | .\" <!-- distribution information. --> | |
4 | .\" Title: courierlogger | |
5 | .\" Author: | |
8d138742 CE |
6 | .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> |
7 | .\" Date: 08/23/2008 | |
d9898ee8 | 8 | .\" Manual: Double Precision, Inc. |
9 | .\" Source: Double Precision, Inc. | |
10 | .\" | |
8d138742 | 11 | .TH "COURIERLOGGER" "1" "08/23/2008" "Double Precision, Inc." "Double Precision, Inc." |
d9898ee8 | 12 | .\" disable hyphenation |
13 | .nh | |
14 | .\" disable justification (adjust text to left margin only) | |
15 | .ad l | |
16 | .SH "NAME" | |
8d138742 | 17 | courierlogger - Courier syslog wrapper |
d9898ee8 | 18 | .SH "SYNOPSIS" |
19 | .HP 14 | |
20 | \fBcourierlogger\fR [\-name=\fItitle\fR] [\-facility=\fIsubsystem\fR] [\-pid=\fIfilename\fR] [\-user=\fIuser\fR] [\-group=\fIgroup\fR] [\-droproot] [[[\-respawn]\ [\-start]\ \fIprogram\fR\ [argument...]] | [\-stop] | [\-restart]] | |
21 | .SH "DESCRIPTION" | |
22 | .PP | |
23 | ||
24 | \fBcourierlogger\fR | |
8d138742 CE |
25 | is a wrapper that captures another process\'s error messages, and forwards them to the system logging facility, |
26 | \(lqsyslog\(rq\. | |
d9898ee8 | 27 | .PP |
28 | There are two ways to use courierlogger: | |
8d138742 | 29 | .sp |
d9898ee8 | 30 | .RS 4 |
8d138742 CE |
31 | \h'-04' 1.\h'+02'Use the shell to pipe another command\'s standard error, and/or its standard output, to |
32 | \fBcourierlogger\fR\'s standard input\. | |
d9898ee8 | 33 | .RE |
8d138742 | 34 | .sp |
d9898ee8 | 35 | .RS 4 |
36 | \h'-04' 2.\h'+02'Alternatively, | |
37 | \fBcourierlogger\fR | |
8d138742 | 38 | itself can start another process, and arrange to have its standard error captured\. |
d9898ee8 | 39 | .RE |
40 | .sp | |
41 | .RE | |
42 | .PP | |
8d138742 | 43 | In either case, each read line of text is sent as a syslog message\. |
d9898ee8 | 44 | .SH "OPTIONS" |
45 | .PP | |
46 | \-name=\fItitle\fR | |
47 | .RS 4 | |
48 | Use | |
49 | \fItitle\fR | |
8d138742 | 50 | for sending messages to syslog\. |
d9898ee8 | 51 | \fItitle\fR |
8d138742 | 52 | should be the application\'s name\. |
d9898ee8 | 53 | .RE |
54 | .PP | |
55 | \-facility=\fIsubsystem\fR | |
56 | .RS 4 | |
57 | Use | |
58 | \fIsubsystem\fR | |
8d138742 | 59 | for classifying messages\. Your syslog facility uses |
d9898ee8 | 60 | \fIsubsystem\fR |
8d138742 CE |
61 | to determine which log messages are recorded in which log files\. The currently defined subsystems are: |
62 | .sp | |
d9898ee8 | 63 | .RS 4 |
64 | \h'-04'\(bu\h'+03'auth | |
65 | .RE | |
8d138742 | 66 | .sp |
d9898ee8 | 67 | .RS 4 |
68 | \h'-04'\(bu\h'+03'authpriv | |
69 | .RE | |
8d138742 | 70 | .sp |
d9898ee8 | 71 | .RS 4 |
72 | \h'-04'\(bu\h'+03'console | |
73 | .RE | |
8d138742 | 74 | .sp |
d9898ee8 | 75 | .RS 4 |
76 | \h'-04'\(bu\h'+03'cron | |
77 | .RE | |
8d138742 | 78 | .sp |
d9898ee8 | 79 | .RS 4 |
80 | \h'-04'\(bu\h'+03'daemon | |
81 | .RE | |
8d138742 | 82 | .sp |
d9898ee8 | 83 | .RS 4 |
84 | \h'-04'\(bu\h'+03'ftp | |
85 | .RE | |
8d138742 | 86 | .sp |
d9898ee8 | 87 | .RS 4 |
88 | \h'-04'\(bu\h'+03'kern | |
89 | .RE | |
8d138742 | 90 | .sp |
d9898ee8 | 91 | .RS 4 |
92 | \h'-04'\(bu\h'+03'lpr | |
93 | .RE | |
8d138742 | 94 | .sp |
d9898ee8 | 95 | .RS 4 |
96 | \h'-04'\(bu\h'+03'mail | |
97 | .RE | |
8d138742 | 98 | .sp |
d9898ee8 | 99 | .RS 4 |
100 | \h'-04'\(bu\h'+03'news | |
101 | .RE | |
8d138742 | 102 | .sp |
d9898ee8 | 103 | .RS 4 |
104 | \h'-04'\(bu\h'+03'security | |
105 | .RE | |
8d138742 | 106 | .sp |
d9898ee8 | 107 | .RS 4 |
108 | \h'-04'\(bu\h'+03'user | |
109 | .RE | |
8d138742 | 110 | .sp |
d9898ee8 | 111 | .RS 4 |
112 | \h'-04'\(bu\h'+03'uucp | |
113 | .RE | |
8d138742 | 114 | .sp |
d9898ee8 | 115 | .RS 4 |
116 | \h'-04'\(bu\h'+03'local0 | |
117 | .RE | |
8d138742 | 118 | .sp |
d9898ee8 | 119 | .RS 4 |
120 | \h'-04'\(bu\h'+03'local1 | |
121 | .RE | |
8d138742 | 122 | .sp |
d9898ee8 | 123 | .RS 4 |
124 | \h'-04'\(bu\h'+03'local2 | |
125 | .RE | |
8d138742 | 126 | .sp |
d9898ee8 | 127 | .RS 4 |
128 | \h'-04'\(bu\h'+03'local3 | |
129 | .RE | |
8d138742 | 130 | .sp |
d9898ee8 | 131 | .RS 4 |
132 | \h'-04'\(bu\h'+03'local4 | |
133 | .RE | |
8d138742 | 134 | .sp |
d9898ee8 | 135 | .RS 4 |
136 | \h'-04'\(bu\h'+03'local5 | |
137 | .RE | |
8d138742 | 138 | .sp |
d9898ee8 | 139 | .RS 4 |
140 | \h'-04'\(bu\h'+03'local6 | |
141 | .RE | |
8d138742 | 142 | .sp |
d9898ee8 | 143 | .RS 4 |
144 | \h'-04'\(bu\h'+03'local7 | |
145 | .RE | |
146 | .IP "" 4 | |
147 | .sp | |
148 | .it 1 an-trap | |
149 | .nr an-no-space-flag 1 | |
150 | .nr an-break-flag 1 | |
151 | .br | |
8d138742 CE |
152 | Note |
153 | Not all of the above facility names are implemented on every system\. Check your system\'s syslog documentation for information on which facility names are allowed, and which log files record the corresponding messages for each facility\. | |
d9898ee8 | 154 | .RE |
155 | .PP | |
156 | \-pid=\fIfilename\fR | |
157 | .RS 4 | |
158 | Save | |
8d138742 CE |
159 | \fBcourierlogger\fR\'s process ID in |
160 | \fIfilename\fR\. The | |
d9898ee8 | 161 | \fI\-pid\fR |
162 | option is required when | |
163 | \fI\-start\fR, | |
164 | \fI\-stop\fR, | |
165 | \fI\-restart\fR | |
8d138742 | 166 | are given\. If |
d9898ee8 | 167 | \fI\-pid\fR |
168 | is given without any of these, | |
169 | \fI\-start\fR | |
8d138742 | 170 | is assumed\. |
d9898ee8 | 171 | .RE |
172 | .PP | |
173 | \-start | |
174 | .RS 4 | |
8d138742 | 175 | Run as a daemon\. The |
d9898ee8 | 176 | \fBpid\fR |
8d138742 | 177 | option is required\. |
d9898ee8 | 178 | \fBcourierlogger\fR |
179 | will quietly terminate if another | |
180 | \fBcourierlogger\fR | |
8d138742 | 181 | process is already running\. This is used to make sure that only one instance of |
d9898ee8 | 182 | \fIprogram\fR |
8d138742 | 183 | is running at the same time\. Specify a different filename with |
d9898ee8 | 184 | \fBpid\fR |
185 | to start a second copy of | |
8d138742 | 186 | \fIprogram\fR\. |
d9898ee8 | 187 | .RE |
188 | .PP | |
189 | \-respawn | |
190 | .RS 4 | |
191 | Restart | |
192 | \fIprogram\fR | |
8d138742 | 193 | if it terminates\. Normally |
d9898ee8 | 194 | \fBcourierlogger\fR |
195 | itself will terminate when | |
196 | \fIprogram\fR | |
8d138742 | 197 | finishes running\. Use |
d9898ee8 | 198 | \fBrespawn\fR |
8d138742 | 199 | to restart it instead\. |
d9898ee8 | 200 | .RE |
201 | .PP | |
202 | \-restart | |
203 | .RS 4 | |
204 | Send a | |
205 | SIGHUP | |
206 | signal to the courierlogger process (as determined by examining the contents of the file specified by | |
207 | \fBpid\fR), which will in turn send a | |
208 | SIGHUP | |
209 | to its child | |
8d138742 | 210 | \fIprogram\fR\. Does nothing if courierlogger is not running\. |
d9898ee8 | 211 | .sp |
212 | .it 1 an-trap | |
213 | .nr an-no-space-flag 1 | |
214 | .nr an-break-flag 1 | |
215 | .br | |
8d138742 | 216 | Note |
d9898ee8 | 217 | |
218 | \fIprogram\fR | |
219 | must be originally started with the | |
220 | \fBrespawn\fR | |
221 | option if sending it a | |
222 | SIGHUP | |
8d138742 | 223 | causes it to terminate\. |
d9898ee8 | 224 | |
225 | The same thing may be accomplished by sending | |
226 | SIGHUP | |
227 | to | |
228 | \fBcourierlogger\fR | |
8d138742 | 229 | itself\. |
d9898ee8 | 230 | .RE |
231 | .PP | |
232 | \-stop | |
233 | .RS 4 | |
234 | Send a | |
235 | SIGTERM | |
236 | signal to courierlogger, which in turn forwards it on to | |
8d138742 | 237 | \fIprogram\fR\. If |
d9898ee8 | 238 | \fIprogram\fR |
239 | does not terminate in 8 seconds, kill it with | |
8d138742 | 240 | SIGKILL\. |
d9898ee8 | 241 | .RE |
242 | .PP | |
243 | \-user=\fIuser\fR, \-group=\fIgroup\fR | |
244 | .RS 4 | |
8d138742 | 245 | If running as root, change credentials to the given user and/or group, which may be given as names or numeric ids\. |
d9898ee8 | 246 | .sp |
247 | When running a child program, it is started | |
248 | \fIbefore\fR | |
249 | privileges are dropped (unless the | |
250 | \fB\-droproot\fR | |
8d138742 | 251 | option is also given)\. This gives a means of starting a child as root so it can bind to a privileged port, but still have courierlogger run as a non\-root user\. For the |
d9898ee8 | 252 | \fB\-stop\fR |
253 | and | |
254 | \fB\-restart\fR | |
8d138742 | 255 | options to work, you should configure the child program to drop its privileges to the same userid too\. |
d9898ee8 | 256 | .RE |
257 | .PP | |
258 | \-droproot | |
259 | .RS 4 | |
8d138742 | 260 | Drop root privileges before starting the child process\. The |
d9898ee8 | 261 | \fB\-user\fR |
262 | and | |
263 | \fB\-group\fR | |
8d138742 | 264 | options specify the non\-privileges userid and groupid\. Without the |
d9898ee8 | 265 | \fB\-droproot\fR |
266 | option the child process remains a root process, and only the parent | |
267 | \fBcourierlogger\fR | |
8d138742 | 268 | process drops root privileges\. |
d9898ee8 | 269 | .RE |
270 | .PP | |
8d138742 | 271 | \fIprogram\fR [ argument ] \.\.\. |
d9898ee8 | 272 | .RS 4 |
273 | If a program is given | |
274 | \fIprogram\fR | |
275 | will be started as a child process of | |
8d138742 | 276 | \fBcourierlogger\fR, capturing its standard error\. Otherwise, |
d9898ee8 | 277 | \fBcourierlogger\fR |
8d138742 | 278 | reads message from standard input, and automatically terminates when standard input is closed\. |
d9898ee8 | 279 | .RE |
280 | .SH "SEE ALSO" | |
281 | .PP | |
282 | ||
8d138742 CE |
283 | \fI\fBcouriertcpd\fR(1)\fR\&[1], your syslog man page\. |
284 | .SH "NOTES" | |
d9898ee8 | 285 | .IP " 1." 4 |
286 | \fBcouriertcpd\fR(1) | |
287 | .RS 4 | |
288 | \%couriertcpd.html | |
289 | .RE |