From 9940327b9a04bf22fb8eb476a043269a2c26a187 Mon Sep 17 00:00:00 2001 From: Job Evers-Meltzer Date: Mon, 14 Nov 2016 20:34:56 -0600 Subject: [PATCH] enable lbryum info logging when verbose --- lbrynet/core/log_support.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lbrynet/core/log_support.py b/lbrynet/core/log_support.py index 85b09429a..39ffe867e 100644 --- a/lbrynet/core/log_support.py +++ b/lbrynet/core/log_support.py @@ -171,13 +171,14 @@ def convert_verbose(verbose): should be at the info level. if --verbose is provided, but not followed by any arguments, then args.verbose = [] and debug logging should be enabled for all of lbrynet + along with info logging on lbryum. if --verbose is provided and followed by arguments, those arguments will be in a list """ if verbose is None: return [] if verbose == []: - return ['lbrynet'] + return ['lbrynet', 'lbryum'] return verbose @@ -204,6 +205,13 @@ def configure_logging(file_name, console, verbose=None): # allow info. level = 'DEBUG' if verbose else 'INFO' handler = configure_console(level=level) + if 'lbryum' in verbose: + # TODO: this enables lbryum logging on the other handlers + # too which isn't consistent with how verbose logging + # happens with other loggers. Should change the configuration + # so that its only logging at the INFO level for the console. + logging.getLogger('lbryum').setLevel(logging.INFO) + verbose.remove('lbryum') if verbose: handler.addFilter(LoggerNameFilter(verbose))