[Previous] [Contents] [Index] [Next]

setlogmask()

Set the system log priority mask

Synopsis:

#include <syslog.h>

int setlogmask( int maskpri );

Library:

libc

Description:

The setlogmask() function sets the log priority mask to maskpri and returns the previous mask. Calls to syslog() 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 allows all priorities to be logged. See the syslog() function for a list of the priorities.

Returns:

The previous log mask level.

Examples:

See syslog().

Classification:

Standard Unix

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread No

See also:

closelog(), logger, openlog(), syslogd, syslog(), vsyslog(),


[Previous] [Contents] [Index] [Next]