logs-with-params
This commit is contained in:
parent
5c7b28de90
commit
e4e681a9ab
|
@ -32,7 +32,7 @@ type Query {
|
|||
load_shouts_random_topic(limit: Int!): CommonResult! # { topic shouts }
|
||||
|
||||
# editor
|
||||
get_my_shout(shout_id: Int!): CommonResult
|
||||
get_my_shout(shout_id: Int!): CommonResult!
|
||||
get_shouts_drafts: [Shout]
|
||||
|
||||
# topic
|
||||
|
|
|
@ -100,6 +100,6 @@ def after_cursor_execute(conn, cursor, statement, parameters, context, executema
|
|||
if hasattr(conn, 'query_start_time'):
|
||||
elapsed = time.time() - conn.query_start_time
|
||||
conn.query_start_time = None
|
||||
query = f'{statement}'.replace('\n', ' ')
|
||||
query = f'{statement} % {parameters}' if parameters else f'{statement}'.replace('\n', ' ')
|
||||
if elapsed > 1:
|
||||
logger.debug(f"\n{query}\n{'*' * math.floor(elapsed)} {elapsed:.3f} s\n")
|
||||
|
|
Loading…
Reference in New Issue
Block a user