From 3c3833e824aa6fa0584c28df03c18db04de12c1f Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 22 Jun 2010 12:29:20 +0300 Subject: [PATCH] Logging: don't debug db, by default. bzr revid: p_christ@hol.gr-20100622092920-4q7eh8bp2vbg85b3 --- bin/netsvc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/netsvc.py b/bin/netsvc.py index f0fe4687417..d2b6c564111 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -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)