Re: log_line_info

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: log_line_info
Date: 2004-03-03 17:43:04
Message-ID: 200403031743.i23Hh4601174@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
> >> defaulting to the beginning if not found.
> >> Examples: "%T [%P]: " (everybody gets timestamp and pid)
> >> "%T [%P]: %U(at)%D(%C:%S %I line:%L %X%T [%P]:" (same
> >> effect
> >> as example under previous point)
> >> - something else I haven't thought of ;-)
> >
> > Seems the cleanest would be to just print nothing for items that have
> > no meaning for the postmaster.
> >
>
> Not quite clean enough - I also want to be able to supress irrelevant
> literal characters. See the actual patch sent in on Feb 29th at
> http://archives.postgresql.org/pgsql-patches/2004-02/msg00266.php where I
> used the first variant I suggested above.

Yes, I understand there is no way to know if the literal characters are
supposed to print for postmaster message, but is seems easier to just
print them than to do the more complicated options you propose. One
idea would be to suppress whitespace or perhaps special characters
_after_ an option that is skipped --- not perfect, but this is only log
output. Of course, if you do <%option>, you get the leading < but not
the >. Maybe just go with suppressing trailing whitespace of a skipped
option is best.

Also, I think you should switch to lowercase like Peter suggested. You
aren't supporting any of the printf() letters, so you might as well use
lowercase.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-03-03 17:52:40 Re: Tablespaces
Previous Message Bruce Momjian 2004-03-03 17:36:53 Re: simple make check failures

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-03-03 19:03:15 Re: "ALSO" keyword to "CREATE RULE" patch
Previous Message Fabien COELHO 2004-03-03 17:34:44 notice about costly ri checks (2)