Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit dd5b4ec

Browse files
committed
Some connection logging.
1 parent 17cf3f7 commit dd5b4ec

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

hyper/http20/connection.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
GoAwayFrame
1414
)
1515

16+
import logging
1617
import socket
1718

19+
log = logging.getLogger(__name__)
20+
1821

1922
class HTTP20Connection(object):
2023
"""
@@ -293,6 +296,12 @@ def _send_cb(self, frame):
293296

294297
data = frame.serialize()
295298

299+
log.info(
300+
"Sending frame %s on stream %d",
301+
frame.__class__.__name__,
302+
frame.stream_id
303+
)
304+
296305
self._sock.send(data)
297306

298307
def _recv_cb(self):
@@ -319,6 +328,12 @@ def _recv_cb(self):
319328

320329
frame.parse_body(data)
321330

331+
log.info(
332+
"Received frame %s on stream %d",
333+
frame.__class__.__name__,
334+
frame.stream_id
335+
)
336+
322337
# Maintain our flow control window. We don't care about flow control
323338
# really, so increment the window by however much data was sent.
324339
if (isinstance(frame, DataFrame) and

0 commit comments

Comments
 (0)