diff options
| author | 2018-11-14 23:04:54 +0000 | |
|---|---|---|
| committer | 2018-11-14 23:04:54 +0000 | |
| commit | 1ec6d0ad40943c96e8174a74a9b14cf6179efad8 (patch) | |
| tree | eb595fa7e6ebcf1daa9cf70f33ffba69ed190b1e /src/Database.py | |
| parent | Prefix modules/rest_api.py logging with "[HTTP] " (diff) | |
| signature | ||
Log query timing in src/Database.py in 1 line, not 2
Diffstat (limited to 'src/Database.py')
| -rw-r--r-- | src/Database.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Database.py b/src/Database.py index 3a5b498d..4e12deb0 100644 --- a/src/Database.py +++ b/src/Database.py @@ -307,8 +307,6 @@ class Database(object): fetch_func: typing.Callable[[sqlite3.Cursor], typing.Any], params: typing.List=[]): printable_query = " ".join(query.split()) - self.log.trace("executing query: \"%s\" (params: %s)", - [printable_query, params]) start = time.monotonic() cursor = self.cursor() @@ -318,7 +316,8 @@ class Database(object): end = time.monotonic() total_milliseconds = (end - start) * 1000 - self.log.trace("executed in %fms", [total_milliseconds]) + self.log.trace("executed query in %fms: \"%s\" (params: %s)", + [total_millisecons, printable_query, params]) return value def execute_fetchall(self, query: str, params: typing.List=[]): |
