postgres logging Re: [Zope] GUF & SQL login problems
can't you just get your SQL-backend to log/print out the SQL-queries it gets from your GUF? This is what once helped me to figure out a similar problem with loginmanager.
Is it possible with PostgresQL?
Check out the -d switch to postgres and postmaster. You will probably want to add something like: -o -d 1 to the command you use to start postmaster. That will pass the debug switch through from the postmaster to every backend postgres process started. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
can't you just get your SQL-backend to log/print out the SQL-queries it gets from your GUF? This is what once helped me to figure out a similar problem with loginmanager. Is it possible with PostgresQL? Check out the -d switch to postgres and postmaster.
Okay, I changed postmaster.opts to include d=2, and I verified using "pg_ctl status" that it applies. Now where is the log file? The queries do not go to syslog... There is a file that looks like a log: /var/lib/pgsql/data/pg_log. It is growing, but when I start psql and do "SELECT * from pg_log", I get "ERROR: pg_log cannot be accessed by users"... -- Milos Prudek
Milos Prudek wrote:
can't you just get your SQL-backend to log/print out the SQL-queries it gets from your GUF? This is what once helped me to figure out a similar problem with loginmanager. Is it possible with PostgresQL? Check out the -d switch to postgres and postmaster.
Okay, I changed postmaster.opts to include d=2, and I verified using "pg_ctl status" that it applies. Now where is the log file? The queries do not go to syslog...
There is a file that looks like a log: /var/lib/pgsql/data/pg_log. It is growing, but when I start psql and do "SELECT * from pg_log", I get "ERROR: pg_log cannot be accessed by users"...
Have a look at your postgres init skript. On my system the log file is /var/log/postgresql.log #! /bin/sh ... H=/usr/local/pgsql/bin/postmaster LOGFILE=/var/log/postgresql.log DATADIR=/var/lib/pgsql/data ... su - postgres -c "/sbin/startproc -l $LOGFILE $H -o -e -i -d3 -o -F -D$DATADIR" ... -- _______________________________________________________________________ Andreas Heckel andreas@easyleading.org LINUX is like a wigwam...no gates...no windows and an apache inside ;-)
Have a look at your postgres init skript.
Logging works, thanks!! This is the log segment of a single login attempt: 010904.20:38:44.440 [1473] StartTransactionCommand 010904.20:38:44.440 [1473] query: select username from users 010904.20:38:44.441 [1473] ProcessQuery 010904.20:38:44.441 [1473] CommitTransactionCommand 010904.20:38:44.456 [1473] StartTransactionCommand 010904.20:38:44.456 [1473] query: select groupname from groups, users, user_group_map where users.username = 'milos' and users.user_id = user_group_map.user_id and groups.group_id = user_group_map.group_id 010904.20:38:44.457 [1473] ProcessQuery 010904.20:38:44.458 [1473] CommitTransactionCommand 010904.20:38:44.596 [1473] StartTransactionCommand 010904.20:38:44.596 [1473] query: commit 010904.20:38:44.596 [1473] ProcessUtility: commit 010904.20:38:44.597 [1473] CommitTransactionCommand 010904.20:38:44.597 [1473] StartTransactionCommand 010904.20:38:44.597 [1473] query: BEGIN 010904.20:38:44.597 [1473] ProcessUtility: BEGIN 010904.20:38:44.597 [1473] CommitTransactionCommand 010904.20:38:44.597 [1473] StartTransactionCommand 010904.20:38:44.597 [1473] query: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE 010904.20:38:44.598 [1473] ProcessUtility: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE 010904.20:38:44.598 [1473] CommitTransactionCommand 010904.20:39:42.719 [1430] proc_exit(0) 010904.20:39:42.719 [1430] shmem_exit(0) 010904.20:39:42.719 [1430] exit(0) My userAuthenticate has only one line: <dtml-return "_.int('1')"> Yet GUF never authenticates me... -- Milos Prudek
participants (3)
-
320011178755-0001@t-online.de -
Lee Harr -
Milos Prudek