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

Commit 3bc9d50

Browse files
committed
Make --debug more verbose in REPL.
1 parent ac6167d commit 3bc9d50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

iota/bin/repl.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from sys import stderr
1212

1313
from six import text_type
14+
from six.moves import http_client
1415

1516
# Import all IOTA symbols into module scope, so that it's more
1617
# convenient for the user.
@@ -42,13 +43,17 @@ def execute(self, api, **arguments):
4243

4344
# If ``debug_requests`` is specified, log HTTP requests/responses.
4445
if debug_requests:
46+
# Inject a logger into the IOTA HTTP adapter.
4547
basicConfig(level=DEBUG, stream=stderr)
4648

4749
logger = getLogger(__name__)
4850
logger.setLevel(DEBUG)
4951

5052
api.adapter.set_logger(logger)
5153

54+
# Turn on debugging for the underlying HTTP library.
55+
http_client.HTTPConnection.debuglevel=1
56+
5257
try:
5358
self._start_repl(api)
5459
except KeyboardInterrupt:

0 commit comments

Comments
 (0)