mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 00:46:33 +03:00
Dropped configuration of unused logger inside the pool module
This commit is contained in:
parent
d74aea209b
commit
2a9e5c7203
24
lib/pool.py
24
lib/pool.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user