diff --git a/app/adapters/database.py b/app/adapters/database.py index 404aa1c6..abec747d 100644 --- a/app/adapters/database.py +++ b/app/adapters/database.py @@ -56,7 +56,7 @@ async def fetch_one( if settings.DEBUG: time_elapsed = timer.elapsed() log( - f"Executed SQL query: {query} {params} in {time_elapsed:.2f} seconds.", + f"Executed SQL query: {query} {params} in {time_elapsed * 1000:.2f} msec.", extra={ "query": query, "params": params, @@ -80,7 +80,7 @@ async def fetch_all( if settings.DEBUG: time_elapsed = timer.elapsed() log( - f"Executed SQL query: {query} {params} in {time_elapsed:.2f} seconds.", + f"Executed SQL query: {query} {params} in {time_elapsed * 1000:.2f} msec.", extra={ "query": query, "params": params, @@ -105,7 +105,7 @@ async def fetch_val( if settings.DEBUG: time_elapsed = timer.elapsed() log( - f"Executed SQL query: {query} {params} in {time_elapsed:.2f} seconds.", + f"Executed SQL query: {query} {params} in {time_elapsed * 1000:.2f} msec.", extra={ "query": query, "params": params, @@ -125,7 +125,7 @@ async def execute(self, query: MySQLQuery, params: MySQLParams = None) -> int: if settings.DEBUG: time_elapsed = timer.elapsed() log( - f"Executed SQL query: {query} {params} in {time_elapsed:.2f} seconds.", + f"Executed SQL query: {query} {params} in {time_elapsed * 1000:.2f} msec.", extra={ "query": query, "params": params, @@ -147,7 +147,7 @@ async def execute_many(self, query: str, params: list[MySQLParams]) -> None: if settings.DEBUG: time_elapsed = timer.elapsed() log( - f"Executed SQL query: {query} {params} in {time_elapsed:.2f} seconds.", + f"Executed SQL query: {query} {params} in {time_elapsed * 1000:.2f} msec.", extra={ "query": query, "params": params,