.\" Copyright (C) 2001 Andries Brouwer . .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Japanese Version Copyright (c) 2001 Akihiro MOTOKI .\" all rights reserved. .\" Translated Sat Nov 3 01:46:03 JST 2001 .\" by Akihiro MOTOKI .\" .\"WORD: logging ログ収集 .\" .TH SETLOGMASK 3 2001-10-05 "" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O setlogmask \- set log priority mask setlogmask \- ログの優先度マスクを設定する .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "int setlogmask(int " mask ); .fi .\"O .SH DESCRIPTION .SH 説明 .\"O A process has a log priority mask that determines which calls to .\"O .BR syslog (3) .\"O may be logged. .\"O All other calls will be ignored. プロセスにはログ優先度マスク(log priority mask)が用意されていて、 これを用いて .BR syslog (3) が呼び出された場合にログ記録を行うかどうかを決定する。 他のすべての関数が呼び出された場合はログ記録が行われない。 .\"O Logging is enabled for the priorities that have the corresponding .\"O bit set in .\"O .IR mask . .I mask の各ビットは優先度に対応しており、対応するビットが 1 にセットされている 優先度に対してログ収集(logging)が有効になる。 .\"O The initial mask is such that logging is enabled for all priorities. マスクの初期値は、すべての優先度に対してログ収集が有効になるような値である。 .LP .\"O The .\"O .BR setlogmask () .\"O function sets this logmask for the calling process, .\"O and returns the previous mask. .BR setlogmask () 関数は、呼び出し元のプロセスに対するログマスクを設定し、 変更前のマスクを返す。 .\"O If the mask argument is 0, the current logmask is not modified. .I mask 引き数が 0 ならば、現在のログマスクは変更されない。 .LP .\"O The eight priorities are .\"O .BR LOG_EMERG , .\"O .BR LOG_ALERT , .\"O .BR LOG_CRIT , .\"O .BR LOG_ERR , .\"O .BR LOG_WARNING , .\"O .BR LOG_NOTICE , .\"O .BR LOG_INFO , .\"O and .\"O .BR LOG_DEBUG . .\"O The bit corresponding to a priority \fIp\fP is \fBLOG_MASK\fP(\fIp\fP). .\"O Some systems also provide a macro \fBLOG_UPTO\fP(\fIp\fP) for the mask .\"O of all priorities in the above list up to and including \fIp\fP. 以下の8レベルの優先度が定義されている(優先度の高い順): .BR LOG_EMERG , .BR LOG_ALERT , .BR LOG_CRIT , .BR LOG_ERR , .BR LOG_WARNING , .BR LOG_NOTICE , .BR LOG_INFO , .BR LOG_DEBUG 。 優先度 \fIp\fP に対応するビット列は \fBLOG_MASK\fP(\fIp\fP) によって求められる。 優先度 \fIp\fP 以上のすべての優先度 (\fIp\fP を含む) のマスクビットを 求めることができるマクロ \fBLOG_UPTO\fP(\fIp\fP) を使用できるシステムもある。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O This function returns the previous log priority mask. 変更前のログ優先度マスクの値を返す。 .\"O .SH ERRORS .SH エラー .\"O None. なし。 .\"O .\" .SH NOTES .SH 注意 .\"O .\" The glibc logmask handling was broken in versions before glibc 2.1.1. glibc 2.1.1 より前のバージョンでは glibc のログマスクの扱いに不具合がある。 .\"O .SH "CONFORMING TO" .SH 準拠 POSIX.1-2001. .\"O Note that the description in POSIX.1-2001 is flawed. POSIX.1-2001 での説明には欠陥があることに注意すること。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR closelog (3), .BR openlog (3), .BR syslog (3)