OSDN Git Service

92ddf542290d1234f6c965574d3973e25f25ab94
[linuxjm/LDP_man-pages.git] / draft / man3 / setlogmask.3
1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Japanese Version Copyright (c) 2001 Akihiro MOTOKI
24 .\"         all rights reserved.
25 .\" Translated Sat Nov  3 01:46:03 JST 2001
26 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
27 .\"
28 .\"WORD:        logging         ログ収集
29 .\"
30 .TH SETLOGMASK 3  2001-10-05 "" "Linux Programmer's Manual"
31 .\"O .SH NAME
32 .SH 名前
33 .\"O setlogmask \- set log priority mask
34 setlogmask \- ログの優先度マスクを設定する
35 .\"O .SH SYNOPSIS
36 .SH 書式
37 .nf
38 .B #include <syslog.h>
39 .sp
40 .BI "int setlogmask(int " mask );
41 .fi
42 .\"O .SH DESCRIPTION
43 .SH 説明
44 .\"O A process has a log priority mask that determines which calls to
45 .\"O .BR syslog (3)
46 .\"O may be logged.
47 .\"O All other calls will be ignored.
48 プロセスにはログ優先度マスク(log priority mask)が用意されていて、
49 これを用いて
50 .BR syslog (3)
51 が呼び出された場合にログ記録を行うかどうかを決定する。
52 他のすべての関数が呼び出された場合はログ記録が行われない。
53 .\"O Logging is enabled for the priorities that have the corresponding
54 .\"O bit set in
55 .\"O .IR mask .
56 .I mask
57 の各ビットは優先度に対応しており、対応するビットが 1 にセットされている
58 優先度に対してログ収集(logging)が有効になる。
59 .\"O The initial mask is such that logging is enabled for all priorities.
60 マスクの初期値は、すべての優先度に対してログ収集が有効になるような値である。
61 .LP
62 .\"O The
63 .\"O .BR setlogmask ()
64 .\"O function sets this logmask for the calling process,
65 .\"O and returns the previous mask.
66 .BR setlogmask ()
67 関数は、呼び出し元のプロセスに対するログマスクを設定し、
68 変更前のマスクを返す。
69 .\"O If the mask argument is 0, the current logmask is not modified.
70 .I mask
71 引き数が 0 ならば、現在のログマスクは変更されない。
72 .LP
73 .\"O The eight priorities are
74 .\"O .BR LOG_EMERG ,
75 .\"O .BR LOG_ALERT ,
76 .\"O .BR LOG_CRIT ,
77 .\"O .BR LOG_ERR ,
78 .\"O .BR LOG_WARNING ,
79 .\"O .BR LOG_NOTICE ,
80 .\"O .BR LOG_INFO ,
81 .\"O and
82 .\"O .BR LOG_DEBUG .
83 .\"O The bit corresponding to a priority \fIp\fP is \fBLOG_MASK\fP(\fIp\fP).
84 .\"O Some systems also provide a macro \fBLOG_UPTO\fP(\fIp\fP) for the mask
85 .\"O of all priorities in the above list up to and including \fIp\fP.
86 以下の8レベルの優先度が定義されている(優先度の高い順):
87 .BR LOG_EMERG ,
88 .BR LOG_ALERT ,
89 .BR LOG_CRIT ,
90 .BR LOG_ERR ,
91 .BR LOG_WARNING ,
92 .BR LOG_NOTICE ,
93 .BR LOG_INFO ,
94 .BR LOG_DEBUG 。
95 優先度 \fIp\fP に対応するビット列は \fBLOG_MASK\fP(\fIp\fP) によって求められる。
96 優先度 \fIp\fP 以上のすべての優先度 (\fIp\fP を含む) のマスクビットを
97 求めることができるマクロ \fBLOG_UPTO\fP(\fIp\fP) を使用できるシステムもある。
98 .\"O .SH "RETURN VALUE"
99 .SH 返り値
100 .\"O This function returns the previous log priority mask.
101 変更前のログ優先度マスクの値を返す。
102 .\"O .SH ERRORS
103 .SH エラー
104 .\"O None.
105 なし。
106 .\"O .\" .SH NOTES
107 .SH 注意
108 .\"O .\" The glibc logmask handling was broken in versions before glibc 2.1.1.
109 glibc 2.1.1 より前のバージョンでは glibc のログマスクの扱いに不具合がある。
110 .\"O .SH "CONFORMING TO"
111 .SH 準拠
112 POSIX.1-2001.
113 .\"O Note that the description in POSIX.1-2001 is flawed.
114 POSIX.1-2001 での説明には欠陥があることに注意すること。
115 .\"O .SH "SEE ALSO"
116 .SH 関連項目
117 .BR closelog (3),
118 .BR openlog (3),
119 .BR syslog (3)