mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 21:38:04 +00:00
Add information about test/production servers when logging connections
This commit is contained in:
parent
6982c436a8
commit
4de203a81c
@ -39,6 +39,7 @@ class Connection:
|
|||||||
|
|
||||||
def __init__(self, dc_id: int, test_mode: bool, ipv6: bool, proxy: dict, mode: int = 3):
|
def __init__(self, dc_id: int, test_mode: bool, ipv6: bool, proxy: dict, mode: int = 3):
|
||||||
self.dc_id = dc_id
|
self.dc_id = dc_id
|
||||||
|
self.test_mode = test_mode
|
||||||
self.ipv6 = ipv6
|
self.ipv6 = ipv6
|
||||||
self.proxy = proxy
|
self.proxy = proxy
|
||||||
self.address = DataCenter(dc_id, test_mode, ipv6)
|
self.address = DataCenter(dc_id, test_mode, ipv6)
|
||||||
@ -59,7 +60,8 @@ class Connection:
|
|||||||
self.connection.close()
|
self.connection.close()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
else:
|
else:
|
||||||
log.info("Connected! DC{} - IPv{} - {}".format(
|
log.info("Connected! {} DC{} - IPv{} - {}".format(
|
||||||
|
"Test" if self.test_mode else "Production",
|
||||||
self.dc_id,
|
self.dc_id,
|
||||||
"6" if self.ipv6 else "4",
|
"6" if self.ipv6 else "4",
|
||||||
self.mode.__name__
|
self.mode.__name__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user