NAME
setlogmask - set log priority mask
SYNOPSIS
#include <syslog.h>
I int setlogmask(int mask );
DESCRIPTION
A process has a log priority mask that determines which calls to
syslog(3)
may be logged.
All other calls will be ignored.
Logging is enabled for the priorities that have the corresponding
bit set in
R mask .
The initial mask is such that logging is enabled for all priorities.
The
R setlogmask ()
function sets this logmask for the current process,
and returns the previous mask.
If the mask argument is 0, the current logmask is not modified.
The eight priorities are
R LOG_EMERG ,
R LOG_ALERT ,
R LOG_CRIT ,
R LOG_ERR ,
R LOG_WARNING ,
R LOG_NOTICE ,
R LOG_INFO ,
and
R LOG_DEBUG .
The bit corresponding to a priority p is LOG_MASK(p).
Some systems also provide a macro LOG_UPTO(p) for the mask
of all priorities in the above list up to and including p.
RETURN VALUE
This function returns the previous log priority mask.
ERRORS
None.
CONFORMING TO
POSIX.1-2001.
Note that the description in POSIX.1-2001 is flawed.
SEE ALSO