Re: log_line_info

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: log_line_info
Дата
Msg-id 200403031743.i23Hh4601174@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: log_line_info  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan wrote:
> >> defaulting to the beginning if not found.
> >>     Examples: "%T [%P]: " (everybody gets timestamp and pid)
> >>               "%T [%P]: %U@%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@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Thread safe connection-name mapping in ECPG. Is it
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: simple make check failures