Re: logging how to add timestamp

From: Ray Stell <stellr(at)cns(dot)vt(dot)edu>
To: "Campbell, Lance" <lance(at)illinois(dot)edu>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: logging how to add timestamp
Date: 2011-06-01 17:17:45
Message-ID: 20110601171745.GA3027@cns.vt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Jun 01, 2011 at 04:56:12PM +0000, Campbell, Lance wrote:
> Postgresql: 8.4.x
> How do you add a timestamp to the logs. Currently I see:
>
> ERROR: {some error message}
> STATEMENT: {the sql statement}
>
> Ideally I would like to have the timestamp in front of the statements.
>
> Thanks,
>
> Lance Campbell
> Software Architect/Project Manager/DBA
> Web Services at Public Affairs
> 217.333.0382
> http://illinois.edu/toolbox
>

log_line_prefix

# %t = timestamp (no milliseconds)
# %m = timestamp with milliseconds

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2011-06-01 22:04:58 Re: pgpool versus sequences
Previous Message Campbell, Lance 2011-06-01 16:56:12 logging how to add timestamp