setlogmask - phpMan

Command: man perldoc info search(apropos)  

File:,  Node: setlogmask,  Next: Syslog Example,  Prev: closelog,  Up: Submitting Syslog Messages

18.2.4 setlogmask

The symbols referred to in this section are declared in the file

 -- Function: int setlogmask (int MASK)
     Preliminary: | MT-Unsafe race:LogMask | AS-Unsafe | AC-Safe | *Note
     POSIX Safety Concepts::.

     'setlogmask' sets a mask (the "logmask") that determines which
     future 'syslog' calls shall be ignored.  If a program has not
     called 'setlogmask', 'syslog' doesn't ignore any calls.  You can
     use 'setlogmask' to specify that messages of particular priorities
     shall be ignored in the future.

     A 'setlogmask' call overrides any previous 'setlogmask' call.

     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

     MASK is a bit string with one bit corresponding to each of the
     possible message priorities.  If the bit is on, 'syslog' handles
     messages of that priority normally.  If it is off, 'syslog'
     discards messages of that priority.  Use the message priority
     macros described in *note syslog; vsyslog:: and the 'LOG_MASK' to
     construct an appropriate MASK value, as in this example:




     There is also a 'LOG_UPTO' macro, which generates a mask with the
     bits on for a certain priority and all priorities above it:


     The unfortunate naming of the macro is due to the fact that
     internally, higher numbers are used for lower message priorities.

Generated by $Id: phpMan.php,v 4.55 2007/09/05 04:42:51 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2018-05-28 05:29 @ CrawledBy CCBot/2.0 (
Valid XHTML 1.0!Valid CSS!