'\" te .\" Copyright (c) 1983 Regents of the University of California.Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved All rights reserved.The Berkeley software License Agreement specifies the terms and conditions for redistribution. .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH logger 1 "1995 年 2 月 1 日" "SunOS 5.11" "ユーザーコマンド" .SH 名前 logger \- システムログへのエントリの追加 .SH 形式 .LP .nf \fBlogger\fR [\fB-i\fR] [\fB-f\fR \fIfile\fR] [\fB-p\fR \fIpriority\fR] [\fB-t\fR \fItag\fR] [\fImessage\fR] ... .fi .SH 機能説明 .sp .LP \fBlogger\fR コマンドは、コマンド行から 1 行のエントリをシステムログファイルに追加する方法を提供しています。1 つ以上の \fImessage\fR 引数をコマンド行に指定できます。その場合、それぞれがすぐに記録されます。指定しない場合は、\fB-f\fR で示されているファイルまたは標準入力がログに追加されます。それ以外の場合は、\fIfile\fR を指定できます。その場合、ファイル内の各行が記録されます。どちらも指定しない場合、\fBlogger\fR は標準入力から 1 行ごとにメッセージを読み取って記録します。 .SH オプション .sp .LP サポートしているオプションは、次のとおりです。 .sp .ne 2 .mk .na \fB\fB-f\fR\fIfile\fR\fR .ad .RS 14n .rt 記録するメッセージとして \fIfile\fR の内容を使用します。 .RE .sp .ne 2 .mk .na \fB\fB-i\fR\fR .ad .RS 14n .rt \fBlogger\fR プロセスのプロセス \fBID\fR を各行に記録します。 .RE .sp .ne 2 .mk .na \fB\fB-p\fR\fIpriority\fR\fR .ad .RS 14n .rt 指定された \fIpriority\fR でメッセージを入力します。メッセージの優先度は、数値で、または\fIfacility\fR\fB\&.\fR\fIlevel\fR ペアとして指定できます。たとえば、`\fB\fR\fB-p\fR\fB local3.info\fR' は、\fBlocal3\fR 機能の \fBinfo\fR レベルにメッセージの優先度を割り当てます。デフォルトの優先度は \fBuser.notice\fR です。 .RE .sp .ne 2 .mk .na \fB\fB-t\fR\fItag\fR\fR .ad .RS 14n .rt ログに追加される各行を指定された \fItag\fR でマークします。 .RE .SH オペランド .sp .LP 次のオペランドを指定できます。 .sp .ne 2 .mk .na \fB\fImessage\fR\fR .ad .RS 11n .rt 文字列引数の 1 つであり、内容は指定された順序で空白文字 1 文字で区切られて連結されます。 .RE .SH 使用例 .LP \fB例 1 \fRlogger コマンドの例 .sp .LP 次の例を見てください。 .sp .in +2 .nf example% \fBlogger System rebooted\fR .fi .in -2 .sp .sp .LP メッセージ `\fBSystem rebooted\fR' をデフォルト優先度レベル \fBnotice\fR で記録し、機能 \fBuser\fR へのその他のメッセージとして \fBsyslogd\fR によって処理します。 .sp .LP 次の例: .sp .in +2 .nf example% \fBlogger -p local0.notice -t HOSTIDM -f /dev/idmc\fR .fi .in -2 .sp .sp .LP ファイル \fB/dev/idmc\fR から読み取り、そのファイルの各行にタグ `\fBHOSTIDM\fR' を付加して優先度レベル \fBnotice\fR でメッセージとして記録し、機能 \fBlocal0\fR へのその他のメッセージとして\fBsyslogd\fR によって処理します。 .SH 環境 .sp .LP \fBlogger\fR の実行に影響する環境変数 (\fBLANG\fR、\fBLC_ALL\fR、\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR、および \fBNLSPATH\fR) の説明については、\fBenviron\fR(5) を参照してください。 .SH 終了ステータス .sp .LP 次の終了ステータスが返されます。 .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt 正常終了。 .RE .sp .ne 2 .mk .na \fB>\fB0\fR\fR .ad .RS 6n .rt エラーが発生した。 .RE .SH 属性 .sp .LP 属性についての詳細は、マニュアルページの \fBattributes\fR(5) を参照してください。 .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性タイプ属性値 _ 使用条件system/core-os _ インタフェースの安定性確実 _ 標準T{ \fBstandards\fR(5) を参照してください。 T} .TE .SH 関連項目 .sp .LP \fBmailx\fR(1)、\fBwrite\fR(1)、\fBsyslogd\fR(1M)、\fBsyslog\fR(3C)、\fBattributes\fR(5)、\fBenviron\fR(5)、\fBstandards\fR(5)