Re: Syslog Facility Patch - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Syslog Facility Patch
Date
Msg-id Pine.LNX.4.21.0011121904470.775-100000@peter.localdomain
Whole thread Raw
In response to Syslog Facility Patch  (Larry Rosenman <ler@lerctr.org>)
Responses Re: Syslog Facility Patch  (Larry Rosenman <ler@lerctr.org>)
List pgsql-hackers
Larry Rosenman writes:

> Here is a patch for allowing the syslog facility to be set.

I think you want to check for invalid values, like "LOCAL37.5".  The last
field in the ConfigNamesString structure (see below) allows you to set a
"parse hook", that is, a function that parses the input value and returns
true if it is okay.  At least this is how it is supposed to work, I've
never actually tried it. :)  Or maybe just make it an integer option?

> ***************
> *** 303,308 ****
> --- 304,312 ----
>   
>       {"unix_socket_group",         PGC_POSTMASTER,       &Unix_socket_group,
>        "", NULL},
> + #ifdef ENABLE_SYSLOG
> +     {"syslog_facility",    PGC_SIGHUP,    &Syslog_facility, "LOCAL0", NULL},     
> + #endif
>   
>       {NULL, 0, NULL, NULL, NULL}
>   };
> 
> 

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: "Gary MacDougall"
Date:
Subject: Re: cygwin gcc problem.
Next
From: "Joe Conway"
Date:
Subject: Re: cygwin gcc problem.