Node:setlogmask, Next:Syslog Example, Previous:closelog, Up:Submitting Syslog Messages
The symbols referred to in this section are declared in the file
syslog.h
.
int setlogmask (int mask) | Function |
A Note that the logmask exists entirely independently of opening and closing of Syslog connections. Setting the logmask has a similar effect to, but is not the same as, configuring Syslog. The Syslog configuration may cause Syslog to discard certain messages it receives, but the logmask causes certain messages never to get submitted to Syslog in the first place. mask is a bit string with one bit corresponding to each of the
possible message priorities. If the bit is on, LOG_MASK(LOG_EMERG) | LOG_MASK(LOG_ERROR) or
~(LOG_MASK(LOG_INFO)) There is also a LOG_UPTO(LOG_ERROR) The unfortunate naming of the macro is due to the fact that internally, higher numbers are used for lower message priorities. |