The Store logging is quite verbose with a flurry of
init and destroy messages with each session. Setting
db.conn.log to False (default) will suppress these. If one
needs to do connection tracing it can be enabled.
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
debug = True
tools.log_request_response.on = False
template_dir = "templates"
debug = True
tools.log_request_response.on = False
template_dir = "templates"
log.screen = True
base.mount = "/idp"
log.screen = True
base.mount = "/idp"
@classmethod
def get_connection(cls, name):
if name not in cls.__instances.keys():
@classmethod
def get_connection(cls, name):
if name not in cls.__instances.keys():
- logging.debug('SqlStore new: %s', name)
+ if cherrypy.config.get('db.conn.log', False):
+ logging.debug('SqlStore new: %s', name)
cls.__instances[name] = SqlStore(name)
return cls.__instances[name]
def __init__(self, name):
cls.__instances[name] = SqlStore(name)
return cls.__instances[name]
def __init__(self, name):
+ self.db_conn_log = cherrypy.config.get('db.conn.log', False)
self.debug('SqlStore init: %s' % name)
self.name = name
engine_name = name
self.debug('SqlStore init: %s' % name)
self.name = name
engine_name = name
self._dbengine = create_engine(engine_name, **pool_args)
self.is_readonly = False
self._dbengine = create_engine(engine_name, **pool_args)
self.is_readonly = False
+ def debug(self, fact):
+ if self.db_conn_log:
+ super(SqlStore, self).debug(fact)
+
def engine(self):
return self._dbengine
def engine(self):
return self._dbengine
debug = ${debugging}
tools.log_request_response.on = False
template_dir = "templates"
debug = ${debugging}
tools.log_request_response.on = False
template_dir = "templates"
log.screen = ${debugging}
base.mount = "/${instance}"
log.screen = ${debugging}
base.mount = "/${instance}"