forked from brmlab/brmbar-github
log all sql statements
This commit is contained in:
parent
8487202b8f
commit
70c46bd950
1 changed files with 1 additions and 0 deletions
|
@ -35,6 +35,7 @@ class Database:
|
||||||
def _execute(self, cur, query, attrs, level=1):
|
def _execute(self, cur, query, attrs, level=1):
|
||||||
"""execute a query, and in case of OperationalError (db restart)
|
"""execute a query, and in case of OperationalError (db restart)
|
||||||
reconnect to database. Recurses with increasig pause between tries"""
|
reconnect to database. Recurses with increasig pause between tries"""
|
||||||
|
logger.debug("SQL: (%s) @%s" % (query, time.strftime("%Y%m%d %a %I:%m %p")))
|
||||||
try:
|
try:
|
||||||
if attrs is None:
|
if attrs is None:
|
||||||
cur.execute(query)
|
cur.execute(query)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue