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