1SETLOGMASK(3) Linux Programmer's Manual SETLOGMASK(3)
2
3
4
6 setlogmask - set log priority mask
7
9 #include <syslog.h>
10
11 int setlogmask(int mask);
12
14 A process has a log priority mask that determines which calls to sys‐
15 log(3) may be logged. All other calls will be ignored. Logging is
16 enabled for the priorities that have the corresponding bit set in mask.
17 The initial mask is such that logging is enabled for all priorities.
18
19 The setlogmask() function sets this logmask for the calling process,
20 and returns the previous mask. If the mask argument is 0, the current
21 logmask is not modified.
22
23 The eight priorities are LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR,
24 LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG. The bit correspond‐
25 ing to a priority p is LOG_MASK(p). Some systems also provide a macro
26 LOG_UPTO(p) for the mask of all priorities in the above list up to and
27 including p.
28
30 This function returns the previous log priority mask.
31
33 None.
34
36 POSIX.1-2001. Note that the description in POSIX.1-2001 is flawed.
37
39 closelog(3), openlog(3), syslog(3)
40
42 This page is part of release 3.53 of the Linux man-pages project. A
43 description of the project, and information about reporting bugs, can
44 be found at http://www.kernel.org/doc/man-pages/.
45
46
47
48 2001-10-05 SETLOGMASK(3)