From bdc3248597261ba97cc015371f2a974e4c49f407 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Mon, 23 Nov 2009 19:32:19 -0500 Subject: [PATCH] Changes for new logging scheme. --- pyfpdb/Database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 0314d78d..d2fb5651 100755 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -45,7 +45,8 @@ import Card import Tourney from Exceptions import * -log = Configuration.get_logger("logging.conf") +log = Configuration.get_logger("logging.conf", config = "db") +log.debug("db logger initialized.") class Database: @@ -186,14 +187,13 @@ class Database: self.config = c self.fdb = fpdb_db.fpdb_db() # sets self.fdb.db self.fdb.cursor and self.fdb.sql self.do_connect(c) - + print "connection =", self.connection if self.backend == self.PGSQL: from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE #ISOLATION_LEVEL_AUTOCOMMIT = 0 #ISOLATION_LEVEL_READ_COMMITTED = 1 #ISOLATION_LEVEL_SERIALIZABLE = 2 - # where possible avoid creating new SQL instance by using the global one passed in if sql is None: self.sql = SQL.Sql(db_server = self.db_server)