summaryrefslogtreecommitdiffstats
path: root/misc-utils/logger.1
diff options
context:
space:
mode:
authorSami Kerola2013-04-05 22:17:24 +0200
committerKarel Zak2013-04-08 16:31:28 +0200
commit68265d070d3041d16ab074ba25c610d6ef6c842e (patch)
tree1bb43a92fa768139a575f69fa90a2292ea54d692 /misc-utils/logger.1
parentfsfreeze: add note about atime to the man page (diff)
downloadkernel-qcow2-util-linux-68265d070d3041d16ab074ba25c610d6ef6c842e.tar.gz
kernel-qcow2-util-linux-68265d070d3041d16ab074ba25c610d6ef6c842e.tar.xz
kernel-qcow2-util-linux-68265d070d3041d16ab074ba25c610d6ef6c842e.zip
logger: allow to log using tcp transport protocol
This commit fixes error in usage() text, which claimed TCP is default transport protocol. That was not true, and neither it should be. The syslog messages has traditionally sent using UDP. For the logger remains using UDP as first transport, but if it fails a TCP connection is attempted. If an user wishes remote logging can be forced to use either UDP or TCP. The service port for UDP is familiar 'syslog', for TCP the port 'syslog-conn' seems like reasonable default. [kzak@redhat.com: - rename myopenlog to unix_socket(), - always reset st to -1] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/logger.1')
-rw-r--r--misc-utils/logger.137
1 files changed, 25 insertions, 12 deletions
diff --git a/misc-utils/logger.1 b/misc-utils/logger.1
index d863ac3a7..09ecdc4f8 100644
--- a/misc-utils/logger.1
+++ b/misc-utils/logger.1
@@ -33,7 +33,7 @@
.\"
.\" Section on valid facility and level strings added by
.\" and1000@debian.org, 26 Oct 1997.
-.TH LOGGER "1" "September 2011" "util-linux" "User Commands"
+.TH LOGGER "1" "April 2013" "util-linux" "User Commands"
.SH NAME
logger \- a shell command interface to the syslog(3) system log module
.SH SYNOPSIS
@@ -47,8 +47,31 @@ interface to the
system log module.
.SH OPTIONS
.TP
+\fB\-n\fR, \fB\-\-server\fR \fIserver\fR
+Write to the specified remote syslog
+.I server
+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) instead of the default stream connection (TCP).
+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 .
+.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.
@@ -61,16 +84,6 @@ This option cannot be combined with a command-line message.
\fB\-h\fR, \fB\-\-help\fR
Display a help text and exit.
.TP
-\fB\-n\fR, \fB\-\-server\fR \fIserver\fR
-Write to the specified remote syslog
-.I server
-using UDP instead of to the builtin syslog routines.
-.TP
-\fB\-P\fR, \fB\-\-port\fR \fIport\fR
-Use the specified UDP
-.IR port .
-The default port number is 514.
-.TP
\fB\-p\fR, \fB\-\-priority\fR \fIpriority\fR
Enter the message into the log with the specified
.IR priority .