xref: /original-bsd/usr.bin/logger/logger.1 (revision acda45c0)
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.6 (Berkeley) 07/24/90
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.Tw Fl
30.Tp Fl i
31Log the process id of the logger process
32with each line.
33.Tp Fl s
34Log the message to standard error, as well as the system log.
35.Tc Fl f
36.Ws
37.Ar file
38.Cx
39Log the specified file.
40.Tc Fl p
41.Ws
42.Ar pri
43.Cx
44Enter the message with the specified priority.
45The priority may be specified numerically or as a ``facility.level''
46pair.
47For example, ``\-p local3.info'' logs the message(s) as
48.Sf Ar info rmational
49level in the
50.Ar local3
51facility.
52The default is ``user.notice.''
53.Tc Fl t
54.Ws
55.Ar tag
56.Cx
57Mark every line in the log with the specified
58.Ar tag  .
59.Tp Ar message
60Write the message to log; if not specified, and the
61.Fl f
62flag is not
63provided, standard input is logged.
64.Tp
65.Pp
66The
67.Nm logger
68utility exits 0 on success, and >0 if an error occurs.
69.Sh EXAMPLES
70.Pp
71.Dl logger System rebooted
72.Pp
73.Dl logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc
74.Sh SEE ALSO
75.Xr syslog 3 ,
76.Xr syslogd 8
77.Sh STANDARDS
78The logger function is expected to be POSIX 1003.2 compatible.
79