setlogmask() — Set the mask for the control log
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2
Single UNIX Specification, Version 3 |
both |
Format
#define _XOPEN_SOURCE_EXTENDED 1
#include <syslog.h>
int setlogmask(int maskpri);
General description
The setlogmask()
function sets the log priority mask for the current process to maskpri and
returns the previous mask. If the maskpri argument
is 0 (zero), the current log mask is not modified. Calls by the current
process to the syslog() function with a priority not set in maskpri are
rejected. The mask for an individual priority pri is
calculated by the macro LOG_MASK(pri)
;
The mask for all priorities up to and including toppri is
given by the macro LOG_UPTO(toppri)
The default log mask allows all priorities to be logged.
Returned value
If successful, setlogmask() returns the value of the previous mask setting.
No errors are defined.