diff options
| author | 2018-08-28 12:23:57 +0100 | |
|---|---|---|
| committer | 2018-08-28 12:23:57 +0100 | |
| commit | e5a5fa5c4b40918247be8486d27a1676b6d2b044 (patch) | |
| tree | 70e61a968a20134b01ea4e4f5611e4e254df06ae /Database.py | |
| parent | Prevent users sending coins to themselves (diff) | |
| signature | ||
modules/logging.py -> IRCLogging.py; IRCLog.py -> IRCBuffer.py; change logging
to be an object on the server object instead of an event call
Diffstat (limited to 'Database.py')
| -rw-r--r-- | Database.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Database.py b/Database.py index 3c6787c3..9f0f7f8b 100644 --- a/Database.py +++ b/Database.py @@ -261,9 +261,8 @@ class Database(object): def _execute_fetch(self, query, fetch_func, params=[]): printable_query = " ".join(query.split()) - self.bot.events.on("log.debug").call( - message="executing query: \"%s\" (params: %s)", - params=[printable_query, params]) + self.bot.log.debug("executing query: \"%s\" (params: %s)", + [printable_query, params]) start = time.monotonic() cursor = self.cursor() @@ -272,9 +271,8 @@ class Database(object): end = time.monotonic() total_milliseconds = (end - start) * 1000 - self.bot.events.on("log.debug").call( - message="executed in %fms", - params=[total_milliseconds]) + self.bot.log.debug("executed in %fms", [total_milliseconds]) + return value def execute_fetchall(self, query, params=[]): return self._execute_fetch(query, |
