From 7df85e2039e63938a820b0a5bd478067561cf0bf Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 2 Jun 2020 13:05:26 +0200 Subject: [PATCH] Show more relevant information when DEBUG logs are enabled Show exactly what is being sent and received --- pyrogram/session/session.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index 3c34f578..3387b3d2 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -286,7 +286,7 @@ class Session: else [data] ) - log.debug(data) + log.debug("Received:\n{}".format(data)) for msg in messages: if msg.seq_no % 2 != 0: @@ -406,6 +406,8 @@ class Session: if wait_response: self.results[msg_id] = Result() + log.debug("Sent:\n{}".format(message)) + payload = self.pack(message) try: