Hide most non-freqtrade logs in -v mode

This commit is contained in:
Matthias 2023-10-05 07:03:29 +02:00
parent 1e0d622d80
commit b2ad40253f

View File

@ -8,13 +8,11 @@ logger = logging.getLogger(__name__)
def set_loggers(verbosity: int = 0, api_verbosity: str = 'info') -> None:
"""
Set the logging level for third party libraries
:param verbosity: Verbosity level. amount of `-v` passed to the command line
:return: None
"""
logging.getLogger('requests').setLevel(
logging.INFO if verbosity <= 1 else logging.DEBUG
)
logging.getLogger("urllib3").setLevel(
for logger_name in ('requests', 'urllib3', 'httpcore'):
logging.getLogger(logger_name).setLevel(
logging.INFO if verbosity <= 1 else logging.DEBUG
)
logging.getLogger('ccxt.base.exchange').setLevel(