.\" Copyright (C) 2001 Andries Brouwer . .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2001 Akihiro MOTOKI .\" all rights reserved. .\" Translated Sat Nov 3 01:46:03 JST 2001 .\" by Akihiro MOTOKI .\" .TH SETLOGMASK 3 2001\-10\-05 "" "Linux Programmer's Manual" .SH 名前 setlogmask \- ログの優先度マスクを設定する .SH 書式 .nf \fB#include \fP .sp \fBint setlogmask(int \fP\fImask\fP\fB);\fP .fi .SH 説明 プロセスにはログ優先度マスク(log priority mask)が用意されていて、 これを用いて \fBsyslog\fP(3) が呼び出された場合にログ記録を行うかどうかを決定する。 他のすべての関数が呼び出された場合はログ記録が行われない。 \fImask\fP の各ビットは優先度に対応しており、対応するビットが 1 にセットされている 優先度に対してログ収集(logging)が有効になる。 マスクの初期値は、すべての優先度に対してログ収集が有効になるような値である。 .LP \fBsetlogmask\fP() 関数は、呼び出し元のプロセスに対するログマスクを設定し、 変更前のマスクを返す。 \fImask\fP 引き数が 0 ならば、現在のログマスクは変更されない。 .LP 以下の8レベルの優先度が定義されている(優先度の高い順): \fBLOG_EMERG\fP, \fBLOG_ALERT\fP, \fBLOG_CRIT\fP, \fBLOG_ERR\fP, \fBLOG_WARNING\fP, \fBLOG_NOTICE\fP, \fBLOG_INFO\fP, \fBLOG_DEBUG\fP。 優先度 \fIp\fP に対応するビット列は \fILOG_MASK(p)\fP によって求められる。 優先度 \fIp\fP 以上のすべての優先度 (\fIp\fP を含む) のマスクビットを 求めることができるマクロ \fILOG_UPTO(p)\fP を使用できるシステムもある。 .SH 返り値 変更前のログ優先度マスクの値を返す。 .SH エラー .\" .SH NOTES .\" The glibc logmask handling was broken in versions before glibc 2.1.1. なし。 .SH 準拠 POSIX.1\-2001. POSIX.1\-2001 での説明には欠陥があることに注意すること。 .SH 関連項目 \fBcloselog\fP(3), \fBopenlog\fP(3), \fBsyslog\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。