From f2e77f40306cabee3476a49abf620e852af25297 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 21 Oct 2018 16:10:09 +0200 Subject: [PATCH] Fix using the wrong logger in Connection --- telethon/network/connection/connection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/telethon/network/connection/connection.py b/telethon/network/connection/connection.py index a83b87e1..e67e3267 100644 --- a/telethon/network/connection/connection.py +++ b/telethon/network/connection/connection.py @@ -158,7 +158,7 @@ class Connection(abc.ABC): pass except Exception: msg = 'Unexpected exception in the send loop' - logging.exception(msg) + __log__.exception(msg) self._disconnect(ConnectionError(msg)) async def _recv_loop(self): @@ -174,13 +174,13 @@ class Connection(abc.ABC): except Exception as e: if isinstance(e, asyncio.IncompleteReadError): msg = 'The server closed the connection' - logging.info(msg) + __log__.info(msg) elif isinstance(e, InvalidChecksumError): msg = 'The server response had an invalid checksum' - logging.info(msg) + __log__.info(msg) else: msg = 'Unexpected exception in the receive loop' - logging.exception(msg) + __log__.exception(msg) await self._recv_queue.put(None) self._disconnect(ConnectionError(msg))