1SETLOGMASK(3)              Linux Programmer's Manual             SETLOGMASK(3)
2
3
4

NAME

6       setlogmask - set log priority mask
7

SYNOPSIS

9       #include <syslog.h>
10
11       int setlogmask(int mask);
12

DESCRIPTION

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  current  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 corresponding
25       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

RETURN VALUE

30       This function returns the previous log priority mask.
31

ERRORS

33       None.
34

CONFORMING TO

36       POSIX.1-2001.  Note that the description in POSIX.1-2001 is flawed.
37

SEE ALSO

39       closelog(3), openlog(3), syslog(3)
40
41
42
43                                  2001-10-05                     SETLOGMASK(3)
Impressum