dblog-debug
All checks were successful
Deploy on push / deploy (push) Successful in 22s

This commit is contained in:
Untone 2024-03-28 16:25:51 +03:00
parent 057b43730e
commit 23fb4227ad

View File

@ -106,6 +106,7 @@ def after_cursor_execute(conn, cursor, statement, parameters, context, executema
if parameters if parameters
else f'{statement}'.replace('\n', ' ') else f'{statement}'.replace('\n', ' ')
) )
if elapsed > 1 and str(conn.last_statement) != str(statement): logger.debug(conn, cursor, statement, parameters, context, executemany)
if elapsed > 1:
conn.last_statement = str(statement) conn.last_statement = str(statement)
logger.debug(f"\n{query}\n{'*' * math.floor(elapsed)} {elapsed:.3f} s\n") logger.debug(f"\n{query}\n{'*' * math.floor(elapsed)} {elapsed:.3f} s\n")