On Mon, Sep 14, 2009 at 02:43, Itagaki Takahiro <itagaki.takah...@oss.ntt.co.jp> wrote: > Here is a patch to add a GUC parameter "syslog_line_prefix". > It adds prefixes to syslog and eventlog. We still have > "log_line_prefix", that will be used only for stderr logs. > > We have a tip that log_line_prefix is not required for syslog > in the documentation, but we'd better to have independent setttings > if we set log_destination to 'stderr, syslog'. > > http://developer.postgresql.org/pgdocs/postgres/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT > | Tip: Syslog produces its own time stamp and process ID > | information, so you probably do not want to use those escapes > | if you are logging to syslog.
I'm not sure I like this as a GUC. We're going to end up with a lot of different GUCs, and everytime we add a new log destination (admittedly not often, of course), that increases even further. And GUCs really don't provide the level of flexibility you'd really like to have. I've been thinking (long-term) in the direction of a separate config file, since that could contain an arbitrary number of lines, with "rules" on them (somewhat like pg_hba.conf maybe). You'd do the matching on things like error level and destination, and then specify a bunch of flags. Or potentially do it on error level and contents, and filtering which destinations get it. Forcing it into the guc framework seems like a limiting long-term strategy. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers