]> git.ipfire.org Git - people/jschlag/pbs.git/commitdiff
Log database statements in debug mode
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:44:38 +0000 (12:44 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:44:38 +0000 (12:44 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/database.py

index 81f80aeef39cbcf0e44522b17a1967a91d7c2ab6..82ab7e25aa3d9a72b0faed5f35369fdb1251efaf 100644 (file)
@@ -164,6 +164,8 @@ class Connection(object):
                return self._db.cursor()
 
        def _execute(self, cursor, query, parameters, kwparameters):
+               logging.debug("Executing SQL: %s" % (query % (kwparameters or parameters)))
+
                try:
                        return cursor.execute(query, kwparameters or parameters)
                except OperationalError: