Imported Upstream version 0.63.0
[hcoop/debian/courier-authlib.git] / liblog / courierlogger.1
CommitLineData
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 17courierlogger - 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
25is a wrapper that captures another process\'s error messages, and forwards them to the system logging facility,
26\(lqsyslog\(rq\.
d9898ee8 27.PP
28There 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 38itself can start another process, and arrange to have its standard error captured\.
d9898ee8 39.RE
40.sp
41.RE
42.PP
8d138742 43In 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
48Use
49\fItitle\fR
8d138742 50for sending messages to syslog\.
d9898ee8 51\fItitle\fR
8d138742 52should be the application\'s name\.
d9898ee8 53.RE
54.PP
55\-facility=\fIsubsystem\fR
56.RS 4
57Use
58\fIsubsystem\fR
8d138742 59for classifying messages\. Your syslog facility uses
d9898ee8 60\fIsubsystem\fR
8d138742
CE
61to 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
152Note
153Not 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
158Save
8d138742
CE
159\fBcourierlogger\fR\'s process ID in
160\fIfilename\fR\. The
d9898ee8 161\fI\-pid\fR
162option is required when
163\fI\-start\fR,
164\fI\-stop\fR,
165\fI\-restart\fR
8d138742 166are given\. If
d9898ee8 167\fI\-pid\fR
168is given without any of these,
169\fI\-start\fR
8d138742 170is assumed\.
d9898ee8 171.RE
172.PP
173\-start
174.RS 4
8d138742 175Run as a daemon\. The
d9898ee8 176\fBpid\fR
8d138742 177option is required\.
d9898ee8 178\fBcourierlogger\fR
179will quietly terminate if another
180\fBcourierlogger\fR
8d138742 181process is already running\. This is used to make sure that only one instance of
d9898ee8 182\fIprogram\fR
8d138742 183is running at the same time\. Specify a different filename with
d9898ee8 184\fBpid\fR
185to start a second copy of
8d138742 186\fIprogram\fR\.
d9898ee8 187.RE
188.PP
189\-respawn
190.RS 4
191Restart
192\fIprogram\fR
8d138742 193if it terminates\. Normally
d9898ee8 194\fBcourierlogger\fR
195itself will terminate when
196\fIprogram\fR
8d138742 197finishes running\. Use
d9898ee8 198\fBrespawn\fR
8d138742 199to restart it instead\.
d9898ee8 200.RE
201.PP
202\-restart
203.RS 4
204Send a
205SIGHUP
206signal to the courierlogger process (as determined by examining the contents of the file specified by
207\fBpid\fR), which will in turn send a
208SIGHUP
209to 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 216Note
d9898ee8 217
218\fIprogram\fR
219must be originally started with the
220\fBrespawn\fR
221option if sending it a
222SIGHUP
8d138742 223causes it to terminate\.
d9898ee8 224
225The same thing may be accomplished by sending
226SIGHUP
227to
228\fBcourierlogger\fR
8d138742 229itself\.
d9898ee8 230.RE
231.PP
232\-stop
233.RS 4
234Send a
235SIGTERM
236signal to courierlogger, which in turn forwards it on to
8d138742 237\fIprogram\fR\. If
d9898ee8 238\fIprogram\fR
239does not terminate in 8 seconds, kill it with
8d138742 240SIGKILL\.
d9898ee8 241.RE
242.PP
243\-user=\fIuser\fR, \-group=\fIgroup\fR
244.RS 4
8d138742 245If running as root, change credentials to the given user and/or group, which may be given as names or numeric ids\.
d9898ee8 246.sp
247When running a child program, it is started
248\fIbefore\fR
249privileges are dropped (unless the
250\fB\-droproot\fR
8d138742 251option 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
253and
254\fB\-restart\fR
8d138742 255options 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 260Drop root privileges before starting the child process\. The
d9898ee8 261\fB\-user\fR
262and
263\fB\-group\fR
8d138742 264options specify the non\-privileges userid and groupid\. Without the
d9898ee8 265\fB\-droproot\fR
266option the child process remains a root process, and only the parent
267\fBcourierlogger\fR
8d138742 268process drops root privileges\.
d9898ee8 269.RE
270.PP
8d138742 271\fIprogram\fR [ argument ] \.\.\.
d9898ee8 272.RS 4
273If a program is given
274\fIprogram\fR
275will be started as a child process of
8d138742 276\fBcourierlogger\fR, capturing its standard error\. Otherwise,
d9898ee8 277\fBcourierlogger\fR
8d138742 278reads 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