Updated: April 19, 2023 |
Set the syslogd system log priority mask
#include <syslog.h> int setlogmask( int maskpri );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The setlogmask() function sets the log priority mask to maskpri and returns the previous mask. Calls to syslog() or vsyslog() with a priority that isn't set in maskpri are rejected.
You can calculate the mask for an individual priority pri with the macro:
LOG_MASK(pri);
You can get the mask for all priorities up to and including toppri with the macro:
LOG_UPTO(toppri);
The default allows all priorities to be logged. See the syslog() function for a list of the priorities.
The previous log mask level.
See syslog().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |