Postgres log help - Postgresql-8.3.5

From: DM <dm(dot)aeqa(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Postgres log help - Postgresql-8.3.5
Date: 2010-02-12 20:04:16
Message-ID: eae6a62a1002121204t2b030fcbp70caa9788ebcca37@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi All,

I am not able to figure out how to change the logging to a single line,

*My log file out puts*

LOG: duration: 0.492 ms
LOG: duration: 0.397 ms
LOG: duration: 0.097 ms
LOG: execute <unnamed>: select count(*) from v_mthly_demo_rollup
LOG: duration: 211.724 ms
LOG: duration: 0.499 ms
LOG: duration: 0.082 ms
LOG: execute <unnamed>: select count(*) from v_mthly__demo_rollup where
(demo_nm='test' AND rollup_eff_yr_mth='200912')
LOG: duration: 0.544 ms
LOG: duration: 0.334 ms
LOG: duration: 0.036 ms

*I want my log file to output something like in the below format*
*
*
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12
11:01:48.630 PST|SELECT|4b72f31d.2da3|8709|2010-02-10 09:55:41 PST|0LOG:
duration: 0.099 ms
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12
11:01:48.630 PST|BIND|4b72f31d.2da3|8710|2010-02-10 09:55:41 PST|0LOG:
duration: 0.011 ms

Here is my postgresql.conf file log configuration information

# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

logging_collector = on # changed on 04/07/2009
log_directory = '/db_log/demo/pgsql8.3.5/pg_log' # changed on
04/07/2009
log_filename = 'postgresql-v8.3.5-%Y-%m-%d_%H%M%S.log' # changed on
04/07/2009
log_truncate_on_rotation = on # changed on 04/07/2009
log_rotation_age = 1d # Automatic rotation of logfiles
will
log_rotation_size = 100MB # changed on 04/07/2009
log_line_prefix = '%u|%d|%r|%p|%t|%m|%i|%c|%l|%s|%x' # changes done on
05/15/2009 :
log_checkpoints = on
log_connections = on
log_disconnections = on
log_duration = on
log_hostname = on
log_line_prefix = '' # special values:
log_lock_waits = on #changed on 04/07/2009
log_statement = 'all' # changed below 6 lines on
04/07/2009
#------------------------------------------------------------------------------

Which parameter should I need to change to output in my log in the below
format
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12
11:01:48.630 PST|SELECT|4b72f31d.2da3|8709|2010-02-10 09:55:41 PST|0LOG:
duration: 0.099 ms
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12
11:01:48.630 PST|BIND|4b72f31d.2da3|8710|2010-02-10 09:55:41 PST|0LOG:
duration: 0.011 ms

Thanks
Deepak

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Lewis Kapell 2010-02-12 20:53:42 Re: Postgres log help - Postgresql-8.3.5
Previous Message Tomeh, Husam 2010-02-12 19:31:08 Re: PG_DUMP backup