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

Commit

Permalink
Make --debug more verbose in REPL.
Browse files Browse the repository at this point in the history
  • Loading branch information
todofixthis committed Nov 17, 2017
1 parent ac6167d commit 3bc9d50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iota/bin/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from sys import stderr

from six import text_type
from six.moves import http_client

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

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

logger = getLogger(__name__)
logger.setLevel(DEBUG)

api.adapter.set_logger(logger)

# Turn on debugging for the underlying HTTP library.
http_client.HTTPConnection.debuglevel=1

try:
self._start_repl(api)
except KeyboardInterrupt:
Expand Down

0 comments on commit 3bc9d50

Please sign in to comment.