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)