Re: [PATCHES] log session end - again - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCHES] log session end - again
Date
Msg-id 4022B945.5030409@dunslane.net
Whole thread Raw
In response to Re: [PATCHES] log session end - again  (Chester Kustarz <chester@arbor.net>)
List pgsql-hackers

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.
Thedefault is an empty       string. The following sequences in the string are translated:       '%U' is replace with
theusername,       '%D' is replaced by the database name,       and '%%' is replaced by '%'.       All other characters
arecopied 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






pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Preventing duplicate vacuums?
Next
From: Josh Berkus
Date:
Subject: Re: Preventing duplicate vacuums?