aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-06-09 18:53:24 -0400
committerRapptz <[email protected]>2017-06-09 18:53:24 -0400
commitb06899e7d4658ab732d1579283771f709a7a4bce (patch)
tree39c3018e9e7f62711d78f607939346f5d4075deb /discord/client.py
parentImplement "partial" message events. (diff)
downloaddiscord.py-b06899e7d4658ab732d1579283771f709a7a4bce.tar.xz
discord.py-b06899e7d4658ab732d1579283771f709a7a4bce.zip
Defer logging formatting until the logger is actually called.
This would cause unnecessary format calls even if you didn't have logging enabled.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py
index 56c1a7e4..f61f48e8 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -405,7 +405,7 @@ class Client:
raise
retry = backoff.delay()
- log.exception("Attempting a reconnect in {:.2f}s".format(retry))
+ log.exception("Attempting a reconnect in %.2fs", retry)
yield from asyncio.sleep(retry, loop=self.loop)
@asyncio.coroutine
@@ -725,7 +725,7 @@ class Client:
raise ClientException('event registered must be a coroutine function')
setattr(self, coro.__name__, coro)
- log.info('{0.__name__} has successfully been registered as an event'.format(coro))
+ log.info('%s has successfully been registered as an event', coro.__name__)
return coro
def async_event(self, coro):