disable noisy loggers
This commit is contained in:
parent
622dc87d84
commit
bc3c2b96ed
2 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,10 @@ def _log_decorator(fn):
|
||||||
return helper
|
return helper
|
||||||
|
|
||||||
|
|
||||||
|
def disable_noisy_loggers():
|
||||||
|
logging.getLogger('requests').setLevel(logging.WARNING)
|
||||||
|
|
||||||
|
|
||||||
@_log_decorator
|
@_log_decorator
|
||||||
def configure_console(**kwargs):
|
def configure_console(**kwargs):
|
||||||
"""Convenience function to configure a logger that outputs to stdout"""
|
"""Convenience function to configure a logger that outputs to stdout"""
|
||||||
|
|
|
@ -74,6 +74,7 @@ def start():
|
||||||
parser.set_defaults(branch=False, launchui=True, logtoconsole=False, quiet=False)
|
parser.set_defaults(branch=False, launchui=True, logtoconsole=False, quiet=False)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
log_support.disable_noisy_loggers()
|
||||||
log_support.configure_file_handler(lbrynet_log)
|
log_support.configure_file_handler(lbrynet_log)
|
||||||
if args.logtoconsole:
|
if args.logtoconsole:
|
||||||
log_support.configure_console()
|
log_support.configure_console()
|
||||||
|
|
Loading…
Reference in a new issue