From: Ray Stell <stellr@cns.vt.edu>
To: Campbell, Lance <lance@illinois.edu>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: logging how to add timestamp
Date: Wed, 1 Jun 2011 13:17:45 -0400
Message-ID: <20110601171745.GA3027@cns.vt.edu> (raw)
In-Reply-To: <B75CD08C73BD3543B97E4EF3964B7D70045E24@CITESMBX2.ad.uillinois.edu>
References: <B75CD08C73BD3543B97E4EF3964B7D70045E24@CITESMBX2.ad.uillinois.edu>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: stellr@cns.vt.edu, lance@illinois.edu
Subject: Re: logging how to add timestamp
In-Reply-To: <20110601171745.GA3027@cns.vt.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox