Commit | Line | Data |
---|---|---|
3c003a08 | 1 | .\" Copyright (c) 1983, 1990 The Regents of the University of California. |
90afda2e | 2 | .\" All rights reserved. |
bede97d4 | 3 | .\" |
3c003a08 | 4 | .\" %sccs.include.redist.man% |
90afda2e | 5 | .\" |
5325ced3 | 6 | .\" @(#)logger.1 6.6 (Berkeley) %G% |
bede97d4 | 7 | .\" |
3c003a08 CL |
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 | |
23 | provides a shell command interface to the | |
24 | .Xr syslog 3 | |
25 | system log module. | |
26 | .Pp | |
27 | Options: | |
28 | .Pp | |
29 | .Tw Fl | |
30 | .Tp Fl i | |
b508c5b1 KB |
31 | Log the process id of the logger process |
32 | with each line. | |
3c003a08 | 33 | .Tp Fl s |
b508c5b1 | 34 | Log the message to standard error, as well as the system log. |
3c003a08 CL |
35 | .Tc Fl f |
36 | .Ws | |
37 | .Ar file | |
38 | .Cx | |
b508c5b1 | 39 | Log the specified file. |
3c003a08 CL |
40 | .Tc Fl p |
41 | .Ws | |
42 | .Ar pri | |
43 | .Cx | |
bede97d4 | 44 | Enter the message with the specified priority. |
b508c5b1 | 45 | The priority may be specified numerically or as a ``facility.level'' |
bede97d4 | 46 | pair. |
b508c5b1 | 47 | For example, ``\-p local3.info'' logs the message(s) as |
3c003a08 | 48 | .Sf Ar info rmational |
bede97d4 | 49 | level in the |
3c003a08 | 50 | .Ar local3 |
bede97d4 EA |
51 | facility. |
52 | The default is ``user.notice.'' | |
3c003a08 CL |
53 | .Tc Fl t |
54 | .Ws | |
55 | .Ar tag | |
56 | .Cx | |
b508c5b1 | 57 | Mark every line in the log with the specified |
3c003a08 CL |
58 | .Ar tag . |
59 | .Tp Ar message | |
60 | Write the message to log; if not specified, and the | |
61 | .Fl f | |
62 | flag is not | |
90afda2e | 63 | provided, standard input is logged. |
3c003a08 CL |
64 | .Tp |
65 | .Pp | |
66 | The | |
67 | .Nm logger | |
68 | utility 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 | |
78 | The logger function is expected to be POSIX 1003.2 compatible. |