sysklogd/man/logger.1
Joachim Nilsson 1a09654e79 Add logger tool from Finit project to complement sysklogd
This patch introduces a relicensed logit from the Finit[1] project.  It
has been rebranded as logger to complement the features implemented in
the sysklogd project.

Note, logger conflicts with the tool of the same name from util-linux.

[1]: https://github.com/troglobit/finit

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-10-13 14:48:37 +02:00

88 lines
3.1 KiB
Groff

.\" -*- nroff -*-
.\" Copyright (c) 2018, 2019 Joachim Nilsson <troglobit@gmail.com>
.\" All rights reserved.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.Dd Oct 13, 2019
.Dt logger 1
.Os "sysklogd (2.0)"
.Sh NAME
.Nm logger
.Nd Send messages to system log, or a log file
.Sh SYNOPSIS
.Nm
.Op Fl hsv
.Op Fl f Ar FILE
.Op Fl n Ar SIZE
.Op Fl p Ar PRIO
.Op Fl r Ar NUM
.Op Fl t Ar TAG
.Qq Ar message
.Sh DESCRIPTIOMN
.Nm
can be used to send messages to the system log from a UNIX shell, or
script.
.Sh OPTIONS
This program follows the usual UNIX command line syntax:
.Bl -tag -width Ds
.It Fl f Ar FILE
File to write log messages to, instead of syslog.
.It Fl h
Show program help.
.It Fl n Ar SIZE
Number of bytes before rotating when logging to a file, default: 200 kB.
.It Fl p Ar PRIO
Priority, numeric or facility.level pair.
.It Fl r Ar NUM
Number of rotated files to keep when logging to a file, default: 5.
.It Fl s
Log to stderr as well as the system log.
.It Fl t Ar TAG
Log using the specified tag, default: username.
.It Fl v
Show program version.
.El
.Sh EXAMPLES
.Bd -unfilled -offset left
logger -t dropbear -p auth.notice "Successful login for user 'admin' from 1.2.3.4"
logger -t udhcpc -f /tmp/script.log "New lease 1.2.3.200 obtained for interface eth0"
.Ed
.Sh SEE ALSO
.Xr syslog 3
.Xr syslogd 8
.Sh AUTHORS
.Nm
was originally written by Joachim Nilsson to be a part of the
.Xr finit 1
system monitor (PID 1), where it is called
.Nm logit .
It is included here to complement
.Xr syslogd 8
and be extended upon in the sysklogd project.
.Sh STANDARDS
The
.Nm
command is expected to be IEEE Std 1003.2 ("POSIX.2") compatible.
.Sh AVAILABILITY