xref: /original-bsd/usr.bin/logger/logger.1 (revision 42f60e33)
1.\" Copyright (c) 1983, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)logger.1	8.1 (Berkeley) 06/06/93
7.\"
8.Dd
9.Dt LOGGER 1
10.Os BSD 4.3
11.Sh NAME
12.Nm logger
13.Nd make entries in the system log
14.Sh SYNOPSIS
15.Nm logger
16.Op Fl is
17.Op Fl f Ar file
18.Op Fl p Ar pri
19.Op Fl t Ar tag
20.Op Ar message ...
21.Sh DESCRIPTION
22.Nm Logger
23provides a shell command interface to the
24.Xr syslog  3
25system log module.
26.Pp
27Options:
28.Pp
29.Bl -tag -width "message"
30.It Fl i
31Log the process id of the logger process
32with each line.
33.It Fl s
34Log the message to standard error, as well as the system log.
35.It Fl f Ar file
36Log the specified file.
37.It Fl p Ar pri
38Enter the message with the specified priority.
39The priority may be specified numerically or as a ``facility.level''
40pair.
41For example, ``\-p local3.info'' logs the message(s) as
42.Ar info Ns rmational
43level in the
44.Ar local3
45facility.
46The default is ``user.notice.''
47.It Fl t Ar tag
48Mark every line in the log with the specified
49.Ar tag  .
50.It Ar message
51Write the message to log; if not specified, and the
52.Fl f
53flag is not
54provided, standard input is logged.
55.El
56.Pp
57The
58.Nm logger
59utility exits 0 on success, and >0 if an error occurs.
60.Sh EXAMPLES
61.Bd -literal -offset indent -compact
62logger System rebooted
63
64logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc
65.Ed
66.Sh SEE ALSO
67.Xr syslog 3 ,
68.Xr syslogd 8
69.Sh STANDARDS
70The
71.Nm logger
72command is expected to be
73.St -p1003.2
74compatible.
75