Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both |
#define _XOPEN_SOURCE_EXTENDED 1
#include <syslog.h>
int setlogmask(int maskpri);
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.
If successful, setlogmask() returns the value of the previous mask setting.
No errors are defined.