From 36225fc55b9b6c441dd86f72d887f648de0c76b2 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 25 Oct 2015 14:23:05 +0100 Subject: [PATCH] [TASK] Add logging for coroutine-related things. --- bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot.py b/bot.py index 779c0b3..69644ad 100644 --- a/bot.py +++ b/bot.py @@ -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))