Logging: don't debug db, by default.

bzr revid: p_christ@hol.gr-20100622092920-4q7eh8bp2vbg85b3
This commit is contained in:
P. Christeas 2010-06-22 12:29:20 +03:00
parent 1ee1886dcd
commit 3c3833e824
1 changed files with 5 additions and 0 deletions

View File

@ -213,6 +213,11 @@ def init_logger():
# add the handler to the root logger
logger.addHandler(handler)
logger.setLevel(int(tools.config['log_level'] or '0'))
# By default, don't log db connections, even at debug.
if int(tools.config['log_level'] or '0') <= logging.DEBUG:
logging.getLogger('db.connection').setLevel(logging.INFO)
logging.getLogger('db.connection_pool').setLevel(logging.INFO)