Re: syslog

From: Martin Schulze (joey@infodrom.org)
Date: Wed Mar 31 2004 - 10:08:12 CEST


Iftikharuddin khan wrote:
> Joey,
> In the man pages for syslog(3) it says that priority is a combination
> of facility and level, but does not tell me what type of combination
> is it. Can you tell me if there is any such combination and any
> related macro for it.

My documentation in syslog(3) says:

       void openlog(const char *ident, int option, int facility);
                                                       ^^^^^^^^
       void syslog(int priority, const char *format, ...);
                       ^^^^^^^^

And further

       The priority argument is formed by ORing the facility
       and the level values (explained below).

So it should be quite clear where to use the facility and where
to use the priority. However, the facility in openlog() only
sets the default, but normally an application does not have to
switch between different facilities.

The combination operator is, as written in the manpage, OR, which
refers to ``|'' in C.

In general all possible combinations form the cartesian product of
facility and priority (or level, it's written a bit confusing).

Regards,

        Joey

-- 
Long noun chains don't automatically imply security.  -- Bruce Schneier


This archive was generated by hypermail 2.1.7 : Wed Mar 31 2004 - 10:16:26 CEST