[TASK] Add logging for coroutine-related things.

This commit is contained in:
Jan Philipp Timme 2015-10-25 14:23:05 +01:00
parent 73d3fba8f4
commit 36225fc55b
1 changed files with 2 additions and 0 deletions

2
bot.py
View File

@ -145,7 +145,9 @@ class ConnectionManager(object):
def _create_connection(self, endpoint):
protocol = IrcProtocol(config=self._configs[endpoint], loop=self._loop, connection_manager=self, endpoint=endpoint)
coroutine = self._loop.create_connection(lambda: protocol, *endpoint)
logger.debug("Coroutine for endpoint {}:{} created.".format(*endpoint))
asyncio.ensure_future(coroutine)
logger.debug("Coroutine for endpoint {}:{} ensured.".format(*endpoint))
def remove_endpoint(self, endpoint):
logger.debug("Endpoint removed: {}:{}".format(*endpoint))