File: logger.1

package info (click to toggle)
manpages-ja 0.5.0.0.20180315%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,516 kB
  • sloc: perl: 161; makefile: 101
file content (136 lines) | stat: -rw-r--r-- 5,311 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.\" Copyright (c) 1983, 1990, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	@(#)logger.1	8.1 (Berkeley) 6/6/93
.\"
.\" Section on valid facitily and level strings added by
.\" and1000@debian.org, 26 Oct 1997.
.\"
.\" Translated Sat Aug 28 JST 1993 by NetBSD jman proj. <jman@spa.is.uec.ac.jp>
.\" Updated Sun Jun 18 JST 2000 by Kentaro Shirakata <argrath@ub32.org>
.\" Updated Tue Jan  9 13:53:03 JST 2001
.\"      by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
.\" Updated Sat Nov 17 15:05:36 JST 2001
.\"      by Yuichi SATO <ysato@h4.dion.ne.jp>
.\" Updated & Modified Sun Mar  2 16:39:57 JST 2003 by Yuichi SATO
.\"
.Dd June 6, 1993
.Dt LOGGER 1
.Os BSD 4.3
.Sh 名前
.Nm logger
.Nd syslog(3) システムログモジュールのシェルコマンドインターフェース
.Sh 書式
.Nm logger
.Op Fl isd
.Op Fl f Ar file
.Op Fl p Ar pri
.Op Fl t Ar tag
.Op Fl u Ar socket
.Op Ar message ...
.Sh 説明
.Nm logger
はシステムログにエントリを作成する。
.Nm logger
.Xr syslog  3
システムログモジュールのシェルコマンドインターフェースを提供する。
.Pp
オプション:
.Pp
.Bl -tag -width "message"
.It Fl i
各行に logger プロセスのプロセス ID を記録する。
.It Fl s
システムログに記録したメッセージを標準エラー出力にも出力する。
.It Fl f Ar file 
指定したファイルの内容を記録する。
.It Fl p Ar pri 
メッセージを指定した優先度 (priority) で登録する。
優先度は数値もしくは ``機能分類.重要度'' の組で指定する。
例えば、``\-p local3.info'' は、重要度
.Ar info Ns rmational
機能分類
.Ar local3
としてメッセージを記録する。
デフォルトは ``user.notice'' である。
.It Fl t Ar tag 
ログを出力する各行に、指定した
.Ar tag
を共に記録する。
.It Fl u Ar sock
組み込みの syslog ルーチンの代わりに
.Ar sock
で指定されたソケットに出力する。
.It Fl d
このソケットへのストリーム接続ではなく、データグラムを使う。
.It --
引数の終わり。
.Ar message
をハイフン (\-) で始められるようにする。
この機能はオリジナルの BSD logger コマンドにはない。
GNU 拡張である。
.It Ar message
log ファイルに書き込むメッセージ。これが指定されず、かつ
.Fl f
オプションも指定されなかった場合は、標準入力からの入力が記録される。
.El
.Pp
.Nm logger
ユーティリティは成功した場合 0 を返し、エラーの場合は 0 より大きい値を返す。
.Pp
指定できる機能分類名は以下の通り:
auth, authpriv (機密に関わる種類のセキュリティ情報),
cron, daemon, ftp, kern, lpr, mail, news,
security (auth の同義語。使わない方が良い), syslog, user, uucp と、
local0 〜 local7。
.Pp
指定できる重要度は以下の通り:
alert, crit, debug, emerg, err, error (err の同義語。使わない方が良い),
info, notice, panic (emerg の同義語。使わない方が良い),
warning, warn (warning の同義語。使わない方が良い)。
これらの重要度の優先順位と意図する目的については、
.Xr syslog 3
を参照すること。
.Sh 例
.Bd -literal -offset indent -compact
logger System rebooted

logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc
.Ed
.Sh 関連項目
.Xr syslog 3 ,
.Xr syslogd 8
.Sh 準拠
.Nm logger
コマンドは
.St -p1003.2
互換のはずである。