File: //usr/lib/courier-imap/man/man1/courierlogger.1
.\" <!-- $Id: courierlogger.sgml,v 1.2 2004/04/24 23:06:56 mrsam Exp $ -->
.\" <!-- Copyright 2004 Double Precision, Inc. See COPYING for -->
.\" <!-- distribution information. -->
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "COURIERLOGGER" "1" "02 September 2004" "Double Precision, Inc." ""
.SH NAME
courierlogger \- Courier syslog wrapper
.SH SYNOPSIS
\fBcourierlogger\fR [ \fB-name=\fItitle\fB\fR ] [ \fB-facility=\fIsubsystem\fB\fR ] [ \fB-pid=\fIfilename\fB\fR ] [ \fB [ -respawn ] -start \fIprogram\fB [ argument\fI ...\fB ]\fR | \fB-stop\fR | \fB-restart\fR ]
.SH "DESCRIPTION"
.PP
\fBcourierlogger\fR
is a wrapper that captures
another process's error messages, and forwards them
to the system logging facility,
``syslog''\&.
.PP
There are two ways to use courierlogger:
.TP 3
1.
Use the shell to pipe another command's standard error, and/or its standard
output, to
\fBcourierlogger\fR\&'s standard input.
.TP 3
2.
Alternatively,
\fBcourierlogger\fR
itself can start another process, and arrange to have its standard error
captured.
.PP
In either case, each read line of text is sent as a syslog message.
.SH "OPTIONS"
.TP
\fB-name=\fItitle\fB\fR
Use \fItitle\fR for sending messages to syslog.
\fItitle\fR should be the application's name.
.TP
\fB-facility=\fIsubsystem\fB\fR
Use \fIsubsystem\fR for classifying messages.
Your syslog facility uses \fIsubsystem\fR to determine
which log messages are recorded in which log files.
The currently defined subsystems are:
.RS
.TP 0.2i
\(bu
auth
.TP 0.2i
\(bu
authpriv
.TP 0.2i
\(bu
console
.TP 0.2i
\(bu
cron
.TP 0.2i
\(bu
daemon
.TP 0.2i
\(bu
ftp
.TP 0.2i
\(bu
kern
.TP 0.2i
\(bu
lpr
.TP 0.2i
\(bu
mail
.TP 0.2i
\(bu
news
.TP 0.2i
\(bu
security
.TP 0.2i
\(bu
user
.TP 0.2i
\(bu
uucp
.TP 0.2i
\(bu
local0
.TP 0.2i
\(bu
local1
.TP 0.2i
\(bu
local2
.TP 0.2i
\(bu
local3
.TP 0.2i
\(bu
local4
.TP 0.2i
\(bu
local5
.TP 0.2i
\(bu
local6
.TP 0.2i
\(bu
local7
.RE
.sp
.RS
.B "Note:"
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.
.RE
.TP
\fB-pid=\fIfilename\fB\fR
Save \fBcourierlogger\fR\&'s
process ID in \fIfilename\fR\&.
The \fI-pid\fR option is required when
\fI-start\fR,
\fI-stop\fR,
\fI-restart\fR\&.
.TP
\fB-start program [argument...]\fR
Start \fIprogram\fR, and capture its standard error.
Otherwise, \fBcourierlogger\fR
reads message from standard input, and automatically terminated when
standard input is closed.
If the \fBstart\fR option is given
\fIprogram\fR
will be started as a child process of
\fBcourierlogger\fR, capturing its standard error.
The \fBpid\fR option is required.
\fBcourierlogger\fR will quietly terminate if another
\fBcourierlogger\fR process is already running.
This is used to make sure that only one instance of
\fIprogram\fR is running at the same time.
Specify a different filename with \fBpid\fR to start a second
copy of \fIprogram\fR\&.
.TP
\fB-respawn\fR
Restart \fIprogram\fR if it terminates.
Normally
\fBcourierlogger\fR itself will terminate when
\fIprogram\fR finishes running.
Use \fBrespawn\fR to restart it instead.
.TP
\fB-restart\fR
Send a SIGHUP signal to \fIprogram\fR\&.
Does nothing if \fIprogram\fR is not running
(as determined by examining the contents of the file specified by
\fBpid\fR).
.sp
.RS
.B "Note:"
\fIprogram\fR must be originally started with the
\fBrespawn\fR option.
.RE
The same thing may be accomplished by sending SIGHUP
to
\fBcourierlogger\fR itself.
.TP
\fB-stop\fR
Send a SIGTERM signal to \fIprogram\fR\&.
If \fIprogram\fR does not terminate in ten seconds, kill it
with SIGKILL\&.
Does nothing if \fIprogram\fR is not running in the first
place
(as determined by examining the contents of the file specified by
\fBpid\fR).
.SH "SEE ALSO"
.PP
\fBcouriertcpd\fR(1), your syslog man page.