Skip to content

Commit 4de203a

Browse files
committed
Add information about test/production servers when logging connections
1 parent 6982c43 commit 4de203a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyrogram/connection/connection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Connection:
3939

4040
def __init__(self, dc_id: int, test_mode: bool, ipv6: bool, proxy: dict, mode: int = 3):
4141
self.dc_id = dc_id
42+
self.test_mode = test_mode
4243
self.ipv6 = ipv6
4344
self.proxy = proxy
4445
self.address = DataCenter(dc_id, test_mode, ipv6)
@@ -59,7 +60,8 @@ def connect(self):
5960
self.connection.close()
6061
time.sleep(1)
6162
else:
62-
log.info("Connected! DC{} - IPv{} - {}".format(
63+
log.info("Connected! {} DC{} - IPv{} - {}".format(
64+
"Test" if self.test_mode else "Production",
6365
self.dc_id,
6466
"6" if self.ipv6 else "4",
6567
self.mode.__name__

0 commit comments

Comments
 (0)