1.\" $MirOS: src/usr.bin/logger/logger.1,v 1.2 2007/09/28 11:23:45 tg Exp $ 2.\" $OpenBSD: logger.1,v 1.11 2004/02/14 18:55:31 jmc Exp $ 3.\" $NetBSD: logger.1,v 1.4 1994/12/22 06:26:59 jtc Exp $ 4.\" 5.\" Copyright (c) 1983, 1990, 1993 6.\" The Regents of the University of California. All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)logger.1 8.1 (Berkeley) 6/6/93 33.\" 34.Dd $Mdocdate: September 28 2007 $ 35.Dt LOGGER 1 36.Os 37.Sh NAME 38.Nm logger 39.Nd make entries in the system log 40.Sh SYNOPSIS 41.Nm logger 42.Op Fl is 43.Op Fl f Ar file 44.Op Fl p Ar pri 45.Op Fl t Ar tag 46.Op Ar message ... 47.Sh DESCRIPTION 48The 49.Nm logger 50utility provides a shell command interface to the 51.Xr syslog 3 52system log module. 53.Pp 54The options are as follows: 55.Bl -tag -width "-f file" 56.It Fl i 57Log the process ID of the logger process 58with each line. 59.It Fl f Ar file 60Log the specified file. 61.It Fl p Ar pri 62Enter the message with the specified priority. 63The priority may be specified numerically or as a 64.Dq facility.level 65pair. 66For example, 67.Dq \-p local3.info 68logs the message(s) as 69.Ar info Ns rmational 70level in the 71.Ar local3 72facility. 73The default is 74.Dq user.notice . 75.It Fl s 76Log the message to standard error, as well as the system log. 77.It Fl t Ar tag 78Mark every line in the log with the specified 79.Ar tag . 80.It Ar message 81Write the message to log; if not specified, and the 82.Fl f 83flag is not 84provided, standard input is logged. 85.El 86.Pp 87The 88.Nm logger 89utility exits 0 on success or >0 if an error occurred. 90.Sh EXAMPLES 91.Bd -literal -offset indent 92$ logger System rebooted 93 94$ logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc 95.Ed 96.Sh SEE ALSO 97.Xr syslog 3 , 98.Xr syslogd 8 99.Sh STANDARDS 100The 101.Nm logger 102utility conforms to 103.St -p1003.2-92 . 104.Sh CAVEATS 105Starting with 106.Mx 10 , 107the 108.Nm 109utility splits the data to log into chunks of 512 bytes each, so that 110further truncation does not occur unless most of the input octets are 111.Xr vis 3 112expanded, i.e. non-printable. 113