Re: [PATCHES] log session end - again

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] log session end - again
Date: 2004-02-05 21:44:37
Message-ID: 4022B945.5030409@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Chester Kustarz wrote:

>On Thu, 5 Feb 2004, Bruce Momjian wrote:
>
>
>>Wow, like the idea too --- pid plus time_t start time of backend.
>>Actully, it would be good to have star time first so you can sort
>>everything in order of start time.
>>
>>
>
>Why not just add a printf like pattern so the user can output
>whatever they like?
> %p - backend pid
> %t - connect time
> %C - standard connection string "%t:%p"
> %a - autoincrement number
>
>

log_line_info where this would be implemented is indeed done with a
printf like string, which is easily extensible The following is adapted
from the description of the original patch which it is my intention to
bring up to date soon and resubmit:

Prefixes each message in the server log file or syslog with extra
information as specified in the string. The default is an empty
string. The following sequences in the string are translated:
'%U' is replace with the username,
'%D' is replaced by the database name,
and '%%' is replaced by '%'.
All other characters are copied literally to the log. For example,
log_line_info = '<%U%%%D> '
will produce output like this:
<myuser%mydb> LOG: query: create table foo(blah text);

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2004-02-05 21:51:49 Re: Preventing duplicate vacuums?
Previous Message Josh Berkus 2004-02-05 21:41:25 Re: Preventing duplicate vacuums?

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Gibson 2004-02-06 10:52:07 Re: dblink - custom datatypes don't work
Previous Message Chester Kustarz 2004-02-05 20:17:15 Re: [PATCHES] log session end - again