Re: postgres access log file

From: Andreas Schmitz <a(dot)schmitz(at)cityweb(dot)de>
To: "Nathalie Boulos" <nathalieboulos(at)hotmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: postgres access log file
Date: 2003-02-28 13:43:01
Message-ID: 200302281443.01342.a.schmitz@cityweb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Friday 28 February 2003 11:31, Nathalie Boulos wrote:
> Hello all,
>
> I was wondering if there is a log file where are logged connection to a
> postgresql database per user and per date.
>
> Or do i have to specify a table and insert rows in it each time a user logs
> in and out?
>
> Regards
>
> Nathalie
>

hi,

I have this in the postgresql.conf

log_connections = true
log_pid = true
log_statement = false
log_duration = true
log_timestamp = true

it outputs this to the log

Feb 26 17:27:46 postgres2 postgres[12416]: [ID 553393 local0.info] [11] LOG:
connection received: host=193.189.226.86 port=33102
Feb 26 17:27:46 postgres2 postgres[12416]: [ID 553393 local0.info] [12] LOG:
connection authorized: user=postgres database=newsdb
Feb 26 17:35:07 postgres2 postgres[12418]: [ID 553393 local0.info] [11] LOG:
connection received: host=193.189.226.86 port=33104
Feb 26 17:35:07 postgres2 postgres[12418]: [ID 553393 local0.info] [12] LOG:
connection authorized: user=postgres database=newsdb

regards

-andreas

--
Andreas Schmitz - Phone +49 201 8501 318
Cityweb-Technik-Service-Gesellschaft mbH
Friedrichstr. 12 - Fax +49 201 8501 104
45128 Essen - email a(dot)schmitz(at)cityweb(dot)de

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message A.Bhuvaneswaran 2003-02-28 13:48:20 Re: postgres access log file
Previous Message Fouad Fezzi 2003-02-28 13:40:48 Re: postgres access log file