diff --git a/mylib/oracle.py b/mylib/oracle.py index 3664a65..edeac24 100644 --- a/mylib/oracle.py +++ b/mylib/oracle.py @@ -112,6 +112,14 @@ class OracleDB: cursor = self._conn.cursor() try: + log.debug( + 'Run SQL query "%s" %s', + sql, + "with params = %s" % ', '.join([ + "%s = %s" % (key, value) + for key, value in params.items() + ]) if params else "without params" + ) if isinstance(params, dict): cursor.execute(sql, **params) else: @@ -120,7 +128,7 @@ class OracleDB: return True except Exception: log.error( - 'Error during SQL request "%s" %s', + 'Error during SQL query "%s" %s', sql, "with params = %s" % ', '.join([ "%s = %s" % (key, value) @@ -143,6 +151,14 @@ class OracleDB: """ cursor = self._conn.cursor() try: + log.debug( + 'Run SQL SELECT query "%s" %s', + sql, + "with params = %s" % ', '.join([ + "%s = %s" % (key, value) + for key, value in params.items() + ]) if params else "without params" + ) if isinstance(params, dict): cursor.execute(sql, **params) else: @@ -152,7 +168,7 @@ class OracleDB: return results except Exception: log.error( - 'Error during SQL request "%s" %s', + 'Error during SQL query "%s" %s', sql, "with params = %s" % ', '.join([ "%s = %s" % (key, value)