logger.1   [plain text]


.\" 
.\" Copyright (c) 2000 Carnegie Mellon University.  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. The name "Carnegie Mellon University" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For permission or any other legal
.\"    details, please contact  
.\"      Office of Technology Transfer
.\"      Carnegie Mellon University
.\"      5000 Forbes Avenue
.\"      Pittsburgh, PA  15213-3890
.\"      (412) 268-4387, fax: (412) 268-7395
.\"      tech-transfer@andrew.cmu.edu
.\"
.\" 4. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by Computing Services
.\"     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
.\"
.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" 
.\" $Revision: 1.2 $
.\"  Modified by Rich $alz <rsalz@osf.org> to be more portable to older
.\"  systems.
.\" Copyright (c) 1983, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"     @(#)logger.1	6.6 (Berkeley) 7/24/90
.\"
.TH LOGGER 1 "July 24, 1990"
.SH NAME
logger \- make entries in the system log
.SH SYNOPSIS
.B logger
[
.B \-i
]
[
.B \-s
]
[
.BI \-f file
]
[
.BI \-p pri
]
[
.BI \-t tag
]
.I message...
.SH DESCRIPTION
.I Logger
provides a shell command interface to the
.IR syslog (3)
system log module.
.PP
Options:
.TP
.B \-i
Log the process id of the logger process with each line.
.TP
.B \-s
Log the message to standard error, as well as the system log.
.TP
.BI \-f file
Log the specified file.
.TP
.BI \-p pri
Enter the message with the specified priority.
The priority may be specified numerically or as a ``facility.level'' pair.
For example, ``\-p local3.info'' logs the message(s) as
.IR info rmational
level in the
.I local3
facility.
The default is ``user.notice.''
.TP
.BI \-t tag
Mark every line in the log with the specified
.IR tag  .
.TP
.I message
Write the message to log; if not specified, and the ``\-f'' flag is not
provided, standard input is logged.
.PP
The
.I logger
utility exits 0 on success, and >0 if an error occurs.
.SH EXAMPLES
.RS
.nf
logger System rebooted

logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc
.fi
.DE
.SH "SEE ALSO"
.syslog(3),
syslogd(8)
.SH STANDARDS
The logger function is expected to be POSIX 1003.2 compatible.