From 939edb2f183242fb319be4521ad85ec7b564b397 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 8 Feb 2019 15:53:44 -0500 Subject: [PATCH] logging -call loop.set_debug when using --verbose --- lbrynet/blob_exchange/client.py | 2 +- lbrynet/extras/cli.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lbrynet/blob_exchange/client.py b/lbrynet/blob_exchange/client.py index 80d78fb22..fc972bc98 100644 --- a/lbrynet/blob_exchange/client.py +++ b/lbrynet/blob_exchange/client.py @@ -51,7 +51,7 @@ class BlobExchangeClientProtocol(asyncio.Protocol): # fire the Future with the response to our request self._response_fut.set_result(response) if response.blob_data and self.writer and not self.writer.closed(): - log.debug("got %i blob bytes from %s:%i", len(response.blob_data), self.peer_address, self.peer_port) + # log.debug("got %i blob bytes from %s:%i", len(response.blob_data), self.peer_address, self.peer_port) # write blob bytes if we're writing a blob and have blob bytes to write self._write(response.blob_data) diff --git a/lbrynet/extras/cli.py b/lbrynet/extras/cli.py index 08ab4b3a5..e5aa3edcd 100644 --- a/lbrynet/extras/cli.py +++ b/lbrynet/extras/cli.py @@ -259,8 +259,11 @@ def main(argv=None): logging.getLogger('aioupnp').setLevel(logging.WARNING) logging.getLogger('aiohttp').setLevel(logging.CRITICAL) + loop = asyncio.get_event_loop() + if args.verbose: log.setLevel(logging.DEBUG) + loop.set_debug(True) else: log.setLevel(logging.INFO) if conf.share_usage_data: @@ -269,7 +272,6 @@ def main(argv=None): log.addHandler(loggly_handler) daemon = Daemon(conf) - loop = asyncio.get_event_loop() try: loop.run_until_complete(daemon.start()) loop.run_forever()