2010-05-14 20:58:32 +04:00
|
|
|
.\" $NetBSD: logger.1,v 1.12 2010/05/14 16:58:32 jruoho Exp $
|
1994-12-22 09:17:28 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1983, 1990, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
|
|
|
.\" 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.
|
2003-08-07 15:13:06 +04:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1993-03-21 12:45:37 +03:00
|
|
|
.\" 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.
|
|
|
|
.\"
|
1994-12-22 09:17:28 +03:00
|
|
|
.\" @(#)logger.1 8.1 (Berkeley) 6/6/93
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
2010-05-14 20:58:32 +04:00
|
|
|
.Dd May 14, 2010
|
1993-03-21 12:45:37 +03:00
|
|
|
.Dt LOGGER 1
|
1999-03-22 21:16:34 +03:00
|
|
|
.Os
|
1993-03-21 12:45:37 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm logger
|
|
|
|
.Nd make entries in the system log
|
|
|
|
.Sh SYNOPSIS
|
1997-10-19 08:16:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Fl is
|
2008-11-01 17:03:12 +03:00
|
|
|
.Op Fl d Ar SD
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Fl f Ar file
|
2008-11-01 17:03:12 +03:00
|
|
|
.Op Fl m Ar msgid
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Fl p Ar pri
|
|
|
|
.Op Fl t Ar tag
|
|
|
|
.Op Ar message ...
|
|
|
|
.Sh DESCRIPTION
|
1997-10-19 08:16:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
provides a shell command interface to the
|
|
|
|
.Xr syslog 3
|
|
|
|
system log module.
|
|
|
|
.Pp
|
|
|
|
Options:
|
|
|
|
.Pp
|
2008-11-01 17:03:12 +03:00
|
|
|
.Bl -tag -width "messageXX"
|
2008-10-31 19:12:18 +03:00
|
|
|
.It Fl d Ar sd
|
|
|
|
Log this in the structured data (SD) field.
|
|
|
|
.Po
|
|
|
|
.Ar sd
|
|
|
|
has to be passed as one argument and will require careful quoting when used from
|
|
|
|
the shell.
|
|
|
|
.Pc
|
2001-12-01 19:43:07 +03:00
|
|
|
.It Fl f Ar file
|
1993-03-21 12:45:37 +03:00
|
|
|
Log the specified file.
|
2008-11-01 17:03:12 +03:00
|
|
|
.It Fl i
|
|
|
|
Log the process id of the logger process
|
|
|
|
with each line.
|
2008-10-31 19:12:18 +03:00
|
|
|
.It Fl m Ar msgid
|
|
|
|
The MSGID used for the message.
|
2001-12-01 19:43:07 +03:00
|
|
|
.It Fl p Ar pri
|
1993-03-21 12:45:37 +03:00
|
|
|
Enter the message with the specified priority.
|
2008-11-01 17:03:12 +03:00
|
|
|
The priority may be specified numerically or as a
|
|
|
|
.Dq facility.level
|
1993-03-21 12:45:37 +03:00
|
|
|
pair.
|
2008-11-01 17:03:12 +03:00
|
|
|
For example,
|
|
|
|
.Dq \-p local3.info
|
|
|
|
logs the message(s) as
|
1993-03-21 12:45:37 +03:00
|
|
|
.Ar info Ns rmational
|
|
|
|
level in the
|
|
|
|
.Ar local3
|
|
|
|
facility.
|
2008-11-01 17:03:12 +03:00
|
|
|
The default is
|
|
|
|
.Dq user.notice .
|
|
|
|
.It Fl s
|
|
|
|
Log the message to standard error, as well as the system log.
|
2001-12-01 19:43:07 +03:00
|
|
|
.It Fl t Ar tag
|
1993-03-21 12:45:37 +03:00
|
|
|
Mark every line in the log with the specified
|
|
|
|
.Ar tag .
|
|
|
|
.It Ar message
|
|
|
|
Write the message to log; if not specified, and the
|
|
|
|
.Fl f
|
2008-11-01 17:03:12 +03:00
|
|
|
flag is not provided, standard input is logged.
|
1993-03-21 12:45:37 +03:00
|
|
|
.El
|
2010-05-14 20:58:32 +04:00
|
|
|
.Sh EXIT STATUS
|
2008-11-01 17:03:12 +03:00
|
|
|
.Ex -std logger
|
1993-03-21 12:45:37 +03:00
|
|
|
.Sh EXAMPLES
|
|
|
|
.Bd -literal -offset indent -compact
|
|
|
|
logger System rebooted
|
|
|
|
|
|
|
|
logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc
|
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr syslog 3 ,
|
|
|
|
.Xr syslogd 8
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
1997-10-19 08:16:47 +04:00
|
|
|
.Nm
|
1993-08-28 08:57:17 +04:00
|
|
|
utility conforms to
|
|
|
|
.St -p1003.2-92 .
|