diff options
Diffstat (limited to 'misc-utils/logger.1')
| -rw-r--r-- | misc-utils/logger.1 | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/misc-utils/logger.1 b/misc-utils/logger.1 index 09ecdc4f8..c7c3de0f5 100644 --- a/misc-utils/logger.1 +++ b/misc-utils/logger.1 @@ -38,7 +38,7 @@ logger \- a shell command interface to the syslog(3) system log module .SH SYNOPSIS .B logger -[options] [message] +.RI [ options "] [" message ] .SH DESCRIPTION .B logger makes entries in the system log. It provides a shell command @@ -47,6 +47,19 @@ interface to the system log module. .SH OPTIONS .TP +\fB\-d\fR, \fB\-\-udp\fR +Use datagram (UDP) only. By default the connection is tried to the +.I syslog +port defined in /etc/services, which is often +.IR 514 . +.TP +\fB\-h\fR, \fB\-\-help\fR +Display help text and exit. +.TP +\fB\-i\fR, \fB\-\-id\fR +Log the process ID of the logger process with each line. +.TP +.TP \fB\-n\fR, \fB\-\-server\fR \fIserver\fR Write to the specified remote syslog .I server @@ -54,36 +67,17 @@ instead of to the builtin syslog routines. Unless .B \-\-udp or .B \-\-tcp -is specified the logger will first try to use UDP, but if it fails a TCP -connection is attempted. -.TP -\fB\-d\fR, \fB\-\-udp\fR -Use datagram (UDP) only. By default the connection is tried to -.I syslog -port defined in /etc/services, which is often -.IR 514 . -.TP -\fB\-T\fR, \fB\-\-tcp\fR -Use stream (TCP) only. By default the connection is tried to -.I syslog-conn -port defined in /etc/services, which is often -.IR 601 . +is specified, \fBlogger\fR will first try to use UDP, +but if thist fails a TCP connection is attempted. .TP \fB\-P\fR, \fB\-\-port\fR \fIport\fR Use the specified .IR port . -.TP -\fB\-i\fR, \fB\-\-id\fR -Log the process ID of the logger process with each line. -.TP \fB\-f\fR, \fB\-\-file\fR \fIfile\fR Log the contents of the specified .IR file . This option cannot be combined with a command-line message. .TP -\fB\-h\fR, \fB\-\-help\fR -Display a help text and exit. -.TP \fB\-p\fR, \fB\-\-priority\fR \fIpriority\fR Enter the message into the log with the specified .IR priority . @@ -97,9 +91,28 @@ logs the message as informational in the local3 facility. The default is .IR user.notice . .TP +\fB\-\-prio\-prefix\fR +Look for a syslog prefix on every line read from standard input. +This prefix is a number within angle brackets that contains both the facility +and the level. This decimal prefix is constructed by multiplying the +facility by 8 and then adding the level. Thus, for example, \fIlocal0.info\fR, +facility=16 and level=6, becomes \fI<134>\fR. + +If the prefix contains no facility, the facility defaults to what is +specified by the \fB\-p\fR option. Similarly, if no prefix is provided, +the line is logged using the \fB\-p\fR \fIpriority\fR. + +This option doesn't affect a command-line message. +.TP \fB\-s\fR, \fB\-\-stderr\fR Output the message to standard error as well as to the system log. .TP +\fB\-T\fR, \fB\-\-tcp\fR +Use stream (TCP) only. By default the connection is tried to the +.I syslog-conn +port defined in /etc/services, which is often +.IR 601 . +.TP \fB\-t\fR, \fB\-\-tag\fR \fItag\fR Mark every line to be logged with the specified .IR tag . @@ -118,8 +131,8 @@ End the argument list. This is to allow the to start with a hyphen (\-). .TP .I message -Write the message to log; if not specified, and the -.I \-f +Write this \fImessage\fR to the log; if not specified, and the +.B \-f flag is not provided, standard input is logged. .PP The |
