RE: [GENERAL] How to get timestamped pgsql logging?

Lists: pgsql-general
From: "Culberson, Philip" <philip(dot)culberson(at)dat(dot)com>
To: "'Ed Loehr'" <ELOEHR(at)austin(dot)rr(dot)com>, "'pgsql-general(at)postgreSQL(dot)org'" <pgsql-general(at)postgreSQL(dot)org>
Subject: RE: [GENERAL] How to get timestamped pgsql logging?
Date: 1999-12-17 19:45:46
Message-ID: A95EFC3B707BD311986C00A0C9E95B6A04B365@datmail03.dat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Oh, one more thing. I've always made the edit BEFORE running ./configure.

Phil Culberson

-----Original Message-----
From: Culberson, Philip
Sent: Friday, December 17, 1999 11:42 AM
To: 'Ed Loehr'; pgsql-general(at)postgreSQL(dot)org
Subject: RE: [GENERAL] How to get timestamped pgsql logging?

Ed,

My own notes on how to get timestamped error logs refer to the file
"...src/include/utils/elog.h". There is a commented out "#define
ELOG_TIMESTAMPS" line in that header as well. Since version 6.4, I have
always uncommented THAT line and I get timestamps in my error logs... can't
tell you why it doesn't work by doing it in the config.h file...

(I am currently using version 6.5.2, so it may have changed in the most
recent version.)

Hope this helps!

Phil Culberson

-----Original Message-----
From: Ed Loehr [mailto:ELOEHR(at)austin(dot)rr(dot)com]
Sent: Thursday, December 16, 1999 11:59 PM
To: pgsql-general(at)postgreSQL(dot)org
Subject: [GENERAL] How to get timestamped pgsql logging?

After following some hints from Bruce Momjian and the pgsql documentation,
I'm still missing something on how to get timestamped backend logging from
pgsql...any help is appreciated...

After running ./configure, I modifed ...src/include/config.h to uncomment
the two lines...

#define ELOG_TIMESTAMPS
#define USE_SYSLOG

Then I ran make, etc, created the file $PGDATA/pg_options...

% cat $PGDATA/pg_options
verbose=2
query
syslog=2

And restarted the server...and still no timestamps.

I verified most everything syslog-wise (configured in /etc/syslog.conf) is
being sent to /var/log/messages...

Anyone notice what am I missing?

Cheers,
Ed Loehr

************


From: Ed Loehr <ELOEHR(at)austin(dot)rr(dot)com>
To: "Culberson, Philip" <philip(dot)culberson(at)dat(dot)com>
Cc: "'pgsql-general(at)postgreSQL(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] How to get timestamped pgsql logging?
Date: 1999-12-17 22:20:40
Message-ID: 385AB738.290ACA8@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Thanks, Phil. Still, the good mojo escapes me. Time to cut my losses.

I commented USE_SYSLOG back out, then twiddled elog.h, twiddled config.h after
./configure (configure builds a new config.h), tried a few variation on
pg_options, all while bringing down postmaster, running 'make clean', 'make',
'make install', and restarting on each try. I rebuilt with printf's in the
trace.c functions near the code segments using ELOG_TIMESTAMPS, but am not
even seeing that output...I can see the new libpq.so...*that* concerns me.
LD_LIBRARY_PATH is set correctly.

Latest incantation of pg_options is:

verbose=2
query

Also tried...

all
verbose=2
query

Cheers,
Ed Loehr

"Culberson, Philip" wrote:

> Oh, one more thing. I've always made the edit BEFORE running ./configure.
>
> Phil Culberson
>
> -----Original Message-----
> From: Culberson, Philip
> Sent: Friday, December 17, 1999 11:42 AM
> To: 'Ed Loehr'; pgsql-general(at)postgreSQL(dot)org
> Subject: RE: [GENERAL] How to get timestamped pgsql logging?
>
> Ed,
>
> My own notes on how to get timestamped error logs refer to the file
> "...src/include/utils/elog.h". There is a commented out "#define
> ELOG_TIMESTAMPS" line in that header as well. Since version 6.4, I have
> always uncommented THAT line and I get timestamps in my error logs... can't
> tell you why it doesn't work by doing it in the config.h file...
>
> (I am currently using version 6.5.2, so it may have changed in the most
> recent version.)
>
> Hope this helps!
>
> Phil Culberson
>
> -----Original Message-----
> From: Ed Loehr [mailto:ELOEHR(at)austin(dot)rr(dot)com]
> Sent: Thursday, December 16, 1999 11:59 PM
> To: pgsql-general(at)postgreSQL(dot)org
> Subject: [GENERAL] How to get timestamped pgsql logging?
>
> After following some hints from Bruce Momjian and the pgsql documentation,
> I'm still missing something on how to get timestamped backend logging from
> pgsql...any help is appreciated...
>
> After running ./configure, I modifed ...src/include/config.h to uncomment
> the two lines...
>
> #define ELOG_TIMESTAMPS
> #define USE_SYSLOG
>
> Then I ran make, etc, created the file $PGDATA/pg_options...
>
> % cat $PGDATA/pg_options
> verbose=2
> query
> syslog=2
>
> And restarted the server...and still no timestamps.
>
> I verified most everything syslog-wise (configured in /etc/syslog.conf) is
> being sent to /var/log/messages...
>
> Anyone notice what am I missing?
>
> Cheers,
> Ed Loehr
>
> ************