Обсуждение: postgres access log file
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 _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
Hi You can use syslog . look at postgresql.conf to setup this. Fouad -----Message d'origine----- De : pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]De la part de Nathalie Boulos Envoyé : vendredi 28 février 2003 11:32 À : pgsql-admin@postgresql.org Objet : [ADMIN] postgres access log file 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 _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
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.schmitz@cityweb.de
Use your postgresql.conf file to enable logged connections: log_connections = on ---------------------------------------------------------------------- Andrew J Perrin - http://www.unc.edu/~aperrin Assistant Professor of Sociology, U of North Carolina, Chapel Hill clists@perrin.socsci.unc.edu * andrew_perrin (at) unc.edu On Fri, 28 Feb 2003, 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 > > > > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
> Hello all, > > I was wondering if there is a log file where are logged connection to a > postgresql database per user and per date. Try -l option with pg_ctl. More details can be found in postgresql.conf. regards, bhuvaneswaran