Reduce log level of savepoints to 5.
So far I am satisfied with how they are working, and they clutter the output so much I can't read anything else. For reference, logging.DEBUG is 10.
This commit is contained in:
parent
32a161baa8
commit
374763f990
1 changed files with 3 additions and 3 deletions
|
@ -718,7 +718,7 @@ class PDBSQLMixin:
|
||||||
# method instead of allowing sql's release to commit.
|
# method instead of allowing sql's release to commit.
|
||||||
self.commit()
|
self.commit()
|
||||||
else:
|
else:
|
||||||
self.log.debug('Releasing savepoint %s', savepoint)
|
self.log.log(5, 'Releasing savepoint %s', savepoint)
|
||||||
self.sql_execute(f'RELEASE "{savepoint}"')
|
self.sql_execute(f'RELEASE "{savepoint}"')
|
||||||
self.savepoints = helpers.slice_before(self.savepoints, savepoint)
|
self.savepoints = helpers.slice_before(self.savepoints, savepoint)
|
||||||
|
|
||||||
|
@ -764,9 +764,9 @@ class PDBSQLMixin:
|
||||||
def savepoint(self, message=None):
|
def savepoint(self, message=None):
|
||||||
savepoint_id = helpers.random_hex(length=16)
|
savepoint_id = helpers.random_hex(length=16)
|
||||||
if message:
|
if message:
|
||||||
self.log.debug('Savepoint %s for %s.', savepoint_id, message)
|
self.log.log(5, 'Savepoint %s for %s.', savepoint_id, message)
|
||||||
else:
|
else:
|
||||||
self.log.debug('Savepoint %s.', savepoint_id)
|
self.log.log(5, 'Savepoint %s.', savepoint_id)
|
||||||
query = f'SAVEPOINT "{savepoint_id}"'
|
query = f'SAVEPOINT "{savepoint_id}"'
|
||||||
self.sql.execute(query)
|
self.sql.execute(query)
|
||||||
self.savepoints.append(savepoint_id)
|
self.savepoints.append(savepoint_id)
|
||||||
|
|
Loading…
Reference in a new issue