]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>. |
2 | .\" | |
4b72fb64 | 3 | .\" %%%LICENSE_START(verbatim) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .TH SETLOGMASK 3 2001-10-05 "" "Linux Programmer's Manual" | |
26 | .SH NAME | |
27 | setlogmask \- set log priority mask | |
28 | .SH SYNOPSIS | |
29 | .nf | |
30 | .B #include <syslog.h> | |
31 | .sp | |
32 | .BI "int setlogmask(int " mask ); | |
33 | .fi | |
34 | .SH DESCRIPTION | |
35 | A process has a log priority mask that determines which calls to | |
36 | .BR syslog (3) | |
c13182ef MK |
37 | may be logged. |
38 | All other calls will be ignored. | |
fea681da MK |
39 | Logging is enabled for the priorities that have the corresponding |
40 | bit set in | |
41 | .IR mask . | |
42 | The initial mask is such that logging is enabled for all priorities. | |
43 | .LP | |
44 | The | |
63aa9df0 | 45 | .BR setlogmask () |
a1ffe9f5 | 46 | function sets this logmask for the calling process, |
fea681da MK |
47 | and returns the previous mask. |
48 | If the mask argument is 0, the current logmask is not modified. | |
49 | .LP | |
2f0af33b MK |
50 | The eight priorities are |
51 | .BR LOG_EMERG , | |
52 | .BR LOG_ALERT , | |
53 | .BR LOG_CRIT , | |
54 | .BR LOG_ERR , | |
55 | .BR LOG_WARNING , | |
56 | .BR LOG_NOTICE , | |
57 | .BR LOG_INFO , | |
58 | and | |
59 | .BR LOG_DEBUG . | |
60 | The bit corresponding to a priority \fIp\fP is \fBLOG_MASK\fP(\fIp\fP). | |
61 | Some systems also provide a macro \fBLOG_UPTO\fP(\fIp\fP) for the mask | |
fea681da | 62 | of all priorities in the above list up to and including \fIp\fP. |
47297adb | 63 | .SH RETURN VALUE |
c13182ef | 64 | This function returns the previous log priority mask. |
fea681da MK |
65 | .SH ERRORS |
66 | None. | |
67 | .\" .SH NOTES | |
68 | .\" The glibc logmask handling was broken in versions before glibc 2.1.1. | |
47297adb | 69 | .SH CONFORMING TO |
68e1685c MK |
70 | POSIX.1-2001. |
71 | Note that the description in POSIX.1-2001 is flawed. | |
47297adb | 72 | .SH SEE ALSO |
fea681da MK |
73 | .BR closelog (3), |
74 | .BR openlog (3), | |
75 | .BR syslog (3) |