Dropped configuration of unused logger inside the pool module

This commit is contained in:
Daniele Varrazzo 2012-12-02 15:55:59 +00:00
parent d74aea209b
commit 2a9e5c7203

View File

@ -27,30 +27,6 @@ This module implements thread-safe (and not) connection pools.
import psycopg2
import psycopg2.extensions as _ext
try:
import logging
# create logger object for psycopg2 module and sub-modules
_logger = logging.getLogger("psycopg2")
def dbg(*args):
_logger.debug("psycopg2", ' '.join([str(x) for x in args]))
try:
import App # does this make sure that we're running in Zope?
_logger.info("installed. Logging using Python logging module")
except:
_logger.debug("installed. Logging using Python logging module")
except ImportError:
from zLOG import LOG, DEBUG, INFO
def dbg(*args):
LOG('ZPsycopgDA', DEBUG, "",
' '.join([str(x) for x in args])+'\n')
LOG('ZPsycopgDA', INFO, "Installed", "Logging using Zope's zLOG\n")
except:
import sys
def dbg(*args):
sys.stderr.write(' '.join(args)+'\n')
class PoolError(psycopg2.Error):
pass