Commit | Line | Data |
---|---|---|
b0322a85 | 1 | '\" t |
d9898ee8 | 2 | .\" <!-- Copyright 2004-2007 Double Precision, Inc. See COPYING for --> |
3 | .\" <!-- distribution information. --> | |
4 | .\" Title: courierlogger | |
b0322a85 CE |
5 | .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] |
6 | .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> | |
d50284c4 | 7 | .\" Date: 06/20/2015 |
d9898ee8 | 8 | .\" Manual: Double Precision, Inc. |
9 | .\" Source: Double Precision, Inc. | |
b0322a85 | 10 | .\" Language: English |
d9898ee8 | 11 | .\" |
d50284c4 | 12 | .TH "COURIERLOGGER" "1" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc." |
b0322a85 CE |
13 | .\" ----------------------------------------------------------------- |
14 | .\" * Define some portability stuff | |
15 | .\" ----------------------------------------------------------------- | |
16 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
17 | .\" http://bugs.debian.org/507673 | |
18 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html | |
19 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
20 | .ie \n(.g .ds Aq \(aq | |
21 | .el .ds Aq ' | |
22 | .\" ----------------------------------------------------------------- | |
23 | .\" * set default formatting | |
24 | .\" ----------------------------------------------------------------- | |
d9898ee8 | 25 | .\" disable hyphenation |
26 | .nh | |
27 | .\" disable justification (adjust text to left margin only) | |
28 | .ad l | |
b0322a85 CE |
29 | .\" ----------------------------------------------------------------- |
30 | .\" * MAIN CONTENT STARTS HERE * | |
31 | .\" ----------------------------------------------------------------- | |
d9898ee8 | 32 | .SH "NAME" |
b0322a85 | 33 | courierlogger \- Courier syslog wrapper |
d9898ee8 | 34 | .SH "SYNOPSIS" |
b0322a85 | 35 | .HP \w'\fBcourierlogger\fR\ 'u |
d9898ee8 | 36 | \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]] |
37 | .SH "DESCRIPTION" | |
38 | .PP | |
d9898ee8 | 39 | \fBcourierlogger\fR |
b0322a85 CE |
40 | is a wrapper that captures another process\*(Aqs error messages, and forwards them to the system logging facility, |
41 | \(lqsyslog\(rq\&. | |
d9898ee8 | 42 | .PP |
43 | There are two ways to use courierlogger: | |
8d138742 | 44 | .sp |
d9898ee8 | 45 | .RS 4 |
b0322a85 CE |
46 | .ie n \{\ |
47 | \h'-04' 1.\h'+01'\c | |
48 | .\} | |
49 | .el \{\ | |
50 | .sp -1 | |
51 | .IP " 1." 4.2 | |
52 | .\} | |
53 | Use the shell to pipe another command\*(Aqs standard error, and/or its standard output, to | |
54 | \fBcourierlogger\fR\*(Aqs standard input\&. | |
d9898ee8 | 55 | .RE |
8d138742 | 56 | .sp |
d9898ee8 | 57 | .RS 4 |
b0322a85 CE |
58 | .ie n \{\ |
59 | \h'-04' 2.\h'+01'\c | |
60 | .\} | |
61 | .el \{\ | |
62 | .sp -1 | |
63 | .IP " 2." 4.2 | |
64 | .\} | |
65 | Alternatively, | |
d9898ee8 | 66 | \fBcourierlogger\fR |
b0322a85 | 67 | itself can start another process, and arrange to have its standard error captured\&. |
d9898ee8 | 68 | .RE |
69 | .PP | |
b0322a85 | 70 | In either case, each read line of text is sent as a syslog message\&. |
d9898ee8 | 71 | .SH "OPTIONS" |
72 | .PP | |
73 | \-name=\fItitle\fR | |
74 | .RS 4 | |
75 | Use | |
76 | \fItitle\fR | |
b0322a85 | 77 | for sending messages to syslog\&. |
d9898ee8 | 78 | \fItitle\fR |
b0322a85 | 79 | should be the application\*(Aqs name\&. |
d9898ee8 | 80 | .RE |
81 | .PP | |
82 | \-facility=\fIsubsystem\fR | |
83 | .RS 4 | |
84 | Use | |
85 | \fIsubsystem\fR | |
b0322a85 | 86 | for classifying messages\&. Your syslog facility uses |
d9898ee8 | 87 | \fIsubsystem\fR |
b0322a85 | 88 | to determine which log messages are recorded in which log files\&. The currently defined subsystems are: |
8d138742 | 89 | .sp |
d9898ee8 | 90 | .RS 4 |
b0322a85 CE |
91 | .ie n \{\ |
92 | \h'-04'\(bu\h'+03'\c | |
93 | .\} | |
94 | .el \{\ | |
95 | .sp -1 | |
96 | .IP \(bu 2.3 | |
97 | .\} | |
98 | auth | |
d9898ee8 | 99 | .RE |
8d138742 | 100 | .sp |
d9898ee8 | 101 | .RS 4 |
b0322a85 CE |
102 | .ie n \{\ |
103 | \h'-04'\(bu\h'+03'\c | |
104 | .\} | |
105 | .el \{\ | |
106 | .sp -1 | |
107 | .IP \(bu 2.3 | |
108 | .\} | |
109 | authpriv | |
d9898ee8 | 110 | .RE |
8d138742 | 111 | .sp |
d9898ee8 | 112 | .RS 4 |
b0322a85 CE |
113 | .ie n \{\ |
114 | \h'-04'\(bu\h'+03'\c | |
115 | .\} | |
116 | .el \{\ | |
117 | .sp -1 | |
118 | .IP \(bu 2.3 | |
119 | .\} | |
120 | console | |
d9898ee8 | 121 | .RE |
8d138742 | 122 | .sp |
d9898ee8 | 123 | .RS 4 |
b0322a85 CE |
124 | .ie n \{\ |
125 | \h'-04'\(bu\h'+03'\c | |
126 | .\} | |
127 | .el \{\ | |
128 | .sp -1 | |
129 | .IP \(bu 2.3 | |
130 | .\} | |
131 | cron | |
d9898ee8 | 132 | .RE |
8d138742 | 133 | .sp |
d9898ee8 | 134 | .RS 4 |
b0322a85 CE |
135 | .ie n \{\ |
136 | \h'-04'\(bu\h'+03'\c | |
137 | .\} | |
138 | .el \{\ | |
139 | .sp -1 | |
140 | .IP \(bu 2.3 | |
141 | .\} | |
142 | daemon | |
d9898ee8 | 143 | .RE |
8d138742 | 144 | .sp |
d9898ee8 | 145 | .RS 4 |
b0322a85 CE |
146 | .ie n \{\ |
147 | \h'-04'\(bu\h'+03'\c | |
148 | .\} | |
149 | .el \{\ | |
150 | .sp -1 | |
151 | .IP \(bu 2.3 | |
152 | .\} | |
153 | ftp | |
d9898ee8 | 154 | .RE |
8d138742 | 155 | .sp |
d9898ee8 | 156 | .RS 4 |
b0322a85 CE |
157 | .ie n \{\ |
158 | \h'-04'\(bu\h'+03'\c | |
159 | .\} | |
160 | .el \{\ | |
161 | .sp -1 | |
162 | .IP \(bu 2.3 | |
163 | .\} | |
164 | kern | |
d9898ee8 | 165 | .RE |
8d138742 | 166 | .sp |
d9898ee8 | 167 | .RS 4 |
b0322a85 CE |
168 | .ie n \{\ |
169 | \h'-04'\(bu\h'+03'\c | |
170 | .\} | |
171 | .el \{\ | |
172 | .sp -1 | |
173 | .IP \(bu 2.3 | |
174 | .\} | |
175 | lpr | |
d9898ee8 | 176 | .RE |
8d138742 | 177 | .sp |
d9898ee8 | 178 | .RS 4 |
b0322a85 CE |
179 | .ie n \{\ |
180 | \h'-04'\(bu\h'+03'\c | |
181 | .\} | |
182 | .el \{\ | |
183 | .sp -1 | |
184 | .IP \(bu 2.3 | |
185 | .\} | |
186 | ||
d9898ee8 | 187 | .RE |
8d138742 | 188 | .sp |
d9898ee8 | 189 | .RS 4 |
b0322a85 CE |
190 | .ie n \{\ |
191 | \h'-04'\(bu\h'+03'\c | |
192 | .\} | |
193 | .el \{\ | |
194 | .sp -1 | |
195 | .IP \(bu 2.3 | |
196 | .\} | |
197 | news | |
d9898ee8 | 198 | .RE |
8d138742 | 199 | .sp |
d9898ee8 | 200 | .RS 4 |
b0322a85 CE |
201 | .ie n \{\ |
202 | \h'-04'\(bu\h'+03'\c | |
203 | .\} | |
204 | .el \{\ | |
205 | .sp -1 | |
206 | .IP \(bu 2.3 | |
207 | .\} | |
208 | security | |
d9898ee8 | 209 | .RE |
8d138742 | 210 | .sp |
d9898ee8 | 211 | .RS 4 |
b0322a85 CE |
212 | .ie n \{\ |
213 | \h'-04'\(bu\h'+03'\c | |
214 | .\} | |
215 | .el \{\ | |
216 | .sp -1 | |
217 | .IP \(bu 2.3 | |
218 | .\} | |
219 | user | |
d9898ee8 | 220 | .RE |
8d138742 | 221 | .sp |
d9898ee8 | 222 | .RS 4 |
b0322a85 CE |
223 | .ie n \{\ |
224 | \h'-04'\(bu\h'+03'\c | |
225 | .\} | |
226 | .el \{\ | |
227 | .sp -1 | |
228 | .IP \(bu 2.3 | |
229 | .\} | |
230 | uucp | |
d9898ee8 | 231 | .RE |
8d138742 | 232 | .sp |
d9898ee8 | 233 | .RS 4 |
b0322a85 CE |
234 | .ie n \{\ |
235 | \h'-04'\(bu\h'+03'\c | |
236 | .\} | |
237 | .el \{\ | |
238 | .sp -1 | |
239 | .IP \(bu 2.3 | |
240 | .\} | |
241 | local0 | |
d9898ee8 | 242 | .RE |
8d138742 | 243 | .sp |
d9898ee8 | 244 | .RS 4 |
b0322a85 CE |
245 | .ie n \{\ |
246 | \h'-04'\(bu\h'+03'\c | |
247 | .\} | |
248 | .el \{\ | |
249 | .sp -1 | |
250 | .IP \(bu 2.3 | |
251 | .\} | |
252 | local1 | |
d9898ee8 | 253 | .RE |
8d138742 | 254 | .sp |
d9898ee8 | 255 | .RS 4 |
b0322a85 CE |
256 | .ie n \{\ |
257 | \h'-04'\(bu\h'+03'\c | |
258 | .\} | |
259 | .el \{\ | |
260 | .sp -1 | |
261 | .IP \(bu 2.3 | |
262 | .\} | |
263 | local2 | |
d9898ee8 | 264 | .RE |
8d138742 | 265 | .sp |
d9898ee8 | 266 | .RS 4 |
b0322a85 CE |
267 | .ie n \{\ |
268 | \h'-04'\(bu\h'+03'\c | |
269 | .\} | |
270 | .el \{\ | |
271 | .sp -1 | |
272 | .IP \(bu 2.3 | |
273 | .\} | |
274 | local3 | |
d9898ee8 | 275 | .RE |
8d138742 | 276 | .sp |
d9898ee8 | 277 | .RS 4 |
b0322a85 CE |
278 | .ie n \{\ |
279 | \h'-04'\(bu\h'+03'\c | |
280 | .\} | |
281 | .el \{\ | |
282 | .sp -1 | |
283 | .IP \(bu 2.3 | |
284 | .\} | |
285 | local4 | |
d9898ee8 | 286 | .RE |
8d138742 | 287 | .sp |
d9898ee8 | 288 | .RS 4 |
b0322a85 CE |
289 | .ie n \{\ |
290 | \h'-04'\(bu\h'+03'\c | |
291 | .\} | |
292 | .el \{\ | |
293 | .sp -1 | |
294 | .IP \(bu 2.3 | |
295 | .\} | |
296 | local5 | |
d9898ee8 | 297 | .RE |
8d138742 | 298 | .sp |
d9898ee8 | 299 | .RS 4 |
b0322a85 CE |
300 | .ie n \{\ |
301 | \h'-04'\(bu\h'+03'\c | |
302 | .\} | |
303 | .el \{\ | |
304 | .sp -1 | |
305 | .IP \(bu 2.3 | |
306 | .\} | |
307 | local6 | |
d9898ee8 | 308 | .RE |
8d138742 | 309 | .sp |
d9898ee8 | 310 | .RS 4 |
b0322a85 CE |
311 | .ie n \{\ |
312 | \h'-04'\(bu\h'+03'\c | |
313 | .\} | |
314 | .el \{\ | |
315 | .sp -1 | |
316 | .IP \(bu 2.3 | |
317 | .\} | |
318 | local7 | |
d9898ee8 | 319 | .RE |
d9898ee8 | 320 | .sp |
b0322a85 CE |
321 | .if n \{\ |
322 | .sp | |
323 | .\} | |
324 | .RS 4 | |
d9898ee8 | 325 | .it 1 an-trap |
326 | .nr an-no-space-flag 1 | |
327 | .nr an-break-flag 1 | |
328 | .br | |
b0322a85 CE |
329 | .ps +1 |
330 | \fBNote\fR | |
331 | .ps -1 | |
332 | .br | |
333 | Not all of the above facility names are implemented on every system\&. Check your system\*(Aqs syslog documentation for information on which facility names are allowed, and which log files record the corresponding messages for each facility\&. | |
334 | .sp .5v | |
335 | .RE | |
d9898ee8 | 336 | .RE |
337 | .PP | |
338 | \-pid=\fIfilename\fR | |
339 | .RS 4 | |
340 | Save | |
b0322a85 CE |
341 | \fBcourierlogger\fR\*(Aqs process ID in |
342 | \fIfilename\fR\&. The | |
d9898ee8 | 343 | \fI\-pid\fR |
344 | option is required when | |
345 | \fI\-start\fR, | |
346 | \fI\-stop\fR, | |
347 | \fI\-restart\fR | |
b0322a85 | 348 | are given\&. If |
d9898ee8 | 349 | \fI\-pid\fR |
350 | is given without any of these, | |
351 | \fI\-start\fR | |
b0322a85 | 352 | is assumed\&. |
d9898ee8 | 353 | .RE |
354 | .PP | |
355 | \-start | |
356 | .RS 4 | |
b0322a85 | 357 | Run as a daemon\&. The |
d9898ee8 | 358 | \fBpid\fR |
b0322a85 | 359 | option is required\&. |
d9898ee8 | 360 | \fBcourierlogger\fR |
361 | will quietly terminate if another | |
362 | \fBcourierlogger\fR | |
b0322a85 CE |
363 | process is already running\&. This is used to make sure that only one instance of |
364 | program | |
365 | is running at the same time\&. Specify a different filename with | |
d9898ee8 | 366 | \fBpid\fR |
367 | to start a second copy of | |
b0322a85 | 368 | program\&. |
d9898ee8 | 369 | .RE |
370 | .PP | |
371 | \-respawn | |
372 | .RS 4 | |
373 | Restart | |
b0322a85 CE |
374 | program |
375 | if it terminates\&. Normally | |
d9898ee8 | 376 | \fBcourierlogger\fR |
377 | itself will terminate when | |
b0322a85 CE |
378 | program |
379 | finishes running\&. Use | |
d9898ee8 | 380 | \fBrespawn\fR |
b0322a85 | 381 | to restart it instead\&. |
d9898ee8 | 382 | .RE |
383 | .PP | |
384 | \-restart | |
385 | .RS 4 | |
386 | Send a | |
387 | SIGHUP | |
388 | signal to the courierlogger process (as determined by examining the contents of the file specified by | |
389 | \fBpid\fR), which will in turn send a | |
390 | SIGHUP | |
391 | to its child | |
b0322a85 CE |
392 | program\&. Does nothing if courierlogger is not running\&. |
393 | .if n \{\ | |
d9898ee8 | 394 | .sp |
b0322a85 CE |
395 | .\} |
396 | .RS 4 | |
d9898ee8 | 397 | .it 1 an-trap |
398 | .nr an-no-space-flag 1 | |
399 | .nr an-break-flag 1 | |
400 | .br | |
b0322a85 CE |
401 | .ps +1 |
402 | \fBNote\fR | |
403 | .ps -1 | |
404 | .br | |
405 | program | |
d9898ee8 | 406 | must be originally started with the |
407 | \fBrespawn\fR | |
408 | option if sending it a | |
409 | SIGHUP | |
b0322a85 CE |
410 | causes it to terminate\&. |
411 | .sp .5v | |
412 | .RE | |
d9898ee8 | 413 | The same thing may be accomplished by sending |
414 | SIGHUP | |
415 | to | |
416 | \fBcourierlogger\fR | |
b0322a85 | 417 | itself\&. |
d9898ee8 | 418 | .RE |
419 | .PP | |
420 | \-stop | |
421 | .RS 4 | |
422 | Send a | |
423 | SIGTERM | |
424 | signal to courierlogger, which in turn forwards it on to | |
b0322a85 CE |
425 | program\&. If |
426 | program | |
d9898ee8 | 427 | does not terminate in 8 seconds, kill it with |
b0322a85 | 428 | SIGKILL\&. |
d9898ee8 | 429 | .RE |
430 | .PP | |
431 | \-user=\fIuser\fR, \-group=\fIgroup\fR | |
432 | .RS 4 | |
b0322a85 | 433 | If running as root, change credentials to the given user and/or group, which may be given as names or numeric ids\&. |
d9898ee8 | 434 | .sp |
435 | When running a child program, it is started | |
436 | \fIbefore\fR | |
437 | privileges are dropped (unless the | |
438 | \fB\-droproot\fR | |
b0322a85 | 439 | 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 | 440 | \fB\-stop\fR |
441 | and | |
442 | \fB\-restart\fR | |
b0322a85 | 443 | options to work, you should configure the child program to drop its privileges to the same userid too\&. |
d9898ee8 | 444 | .RE |
445 | .PP | |
446 | \-droproot | |
447 | .RS 4 | |
b0322a85 | 448 | Drop root privileges before starting the child process\&. The |
d9898ee8 | 449 | \fB\-user\fR |
450 | and | |
451 | \fB\-group\fR | |
b0322a85 | 452 | options specify the non\-privileges userid and groupid\&. Without the |
d9898ee8 | 453 | \fB\-droproot\fR |
454 | option the child process remains a root process, and only the parent | |
455 | \fBcourierlogger\fR | |
b0322a85 | 456 | process drops root privileges\&. |
d9898ee8 | 457 | .RE |
458 | .PP | |
b0322a85 | 459 | \fIprogram\fR [ argument ] \&.\&.\&. |
d9898ee8 | 460 | .RS 4 |
461 | If a program is given | |
b0322a85 | 462 | program |
d9898ee8 | 463 | will be started as a child process of |
b0322a85 | 464 | \fBcourierlogger\fR, capturing its standard error\&. Otherwise, |
d9898ee8 | 465 | \fBcourierlogger\fR |
b0322a85 | 466 | reads message from standard input, and automatically terminates when standard input is closed\&. |
d9898ee8 | 467 | .RE |
468 | .SH "SEE ALSO" | |
469 | .PP | |
b0322a85 | 470 | \m[blue]\fB\fBcouriertcpd\fR(1)\fR\m[]\&\s-2\u[1]\d\s+2, your syslog man page\&. |
8d138742 | 471 | .SH "NOTES" |
d9898ee8 | 472 | .IP " 1." 4 |
473 | \fBcouriertcpd\fR(1) | |
474 | .RS 4 | |
b0322a85 | 475 | \%[set $man.base.url.for.relative.links]/couriertcpd.html |
d9898ee8 | 476 | .RE |