From 05b3be1e885c21f2dfd920e9cafa49bc9c6ab303 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 8 Sep 2018 19:33:47 +0200 Subject: [PATCH] Info log DC number on connection --- pyrogram/connection/connection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyrogram/connection/connection.py b/pyrogram/connection/connection.py index b9d4cc87..e10011d1 100644 --- a/pyrogram/connection/connection.py +++ b/pyrogram/connection/connection.py @@ -38,6 +38,7 @@ class Connection: } def __init__(self, dc_id: int, test_mode: bool, ipv6: bool, proxy: dict, mode: int = 1): + self.dc_id = dc_id self.ipv6 = ipv6 self.proxy = proxy self.address = DataCenter(dc_id, test_mode, ipv6) @@ -58,7 +59,8 @@ class Connection: self.connection.close() time.sleep(1) else: - log.info("Connected! IPv{} - {}".format( + log.info("Connected! DC{} - IPv{} - {}".format( + self.dc_id, "6" if self.ipv6 else "4", self.mode.__name__ ))