Defer logging formatting until the logger is actually called.

This would cause unnecessary format calls even if you didn't have
logging enabled.
This commit is contained in:
Rapptz
2017-06-09 18:53:24 -04:00
parent d239cc2666
commit b06899e7d4
6 changed files with 17 additions and 19 deletions

View File

@ -265,7 +265,7 @@ class ConnectionState:
# call GUILD_SYNC after we're done chunking
if not self.is_bot:
log.info('Requesting GUILD_SYNC for %s guilds' % len(self.guilds))
log.info('Requesting GUILD_SYNC for %s guilds', len(self.guilds))
yield from self.syncer([s.id for s in self.guilds])
except asyncio.CancelledError:
pass