mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Hide most non-freqtrade logs in -v
mode
This commit is contained in:
parent
1e0d622d80
commit
b2ad40253f
|
@ -8,13 +8,11 @@ logger = logging.getLogger(__name__)
|
||||||
def set_loggers(verbosity: int = 0, api_verbosity: str = 'info') -> None:
|
def set_loggers(verbosity: int = 0, api_verbosity: str = 'info') -> None:
|
||||||
"""
|
"""
|
||||||
Set the logging level for third party libraries
|
Set the logging level for third party libraries
|
||||||
|
:param verbosity: Verbosity level. amount of `-v` passed to the command line
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
for logger_name in ('requests', 'urllib3', 'httpcore'):
|
||||||
logging.getLogger('requests').setLevel(
|
logging.getLogger(logger_name).setLevel(
|
||||||
logging.INFO if verbosity <= 1 else logging.DEBUG
|
|
||||||
)
|
|
||||||
logging.getLogger("urllib3").setLevel(
|
|
||||||
logging.INFO if verbosity <= 1 else logging.DEBUG
|
logging.INFO if verbosity <= 1 else logging.DEBUG
|
||||||
)
|
)
|
||||||
logging.getLogger('ccxt.base.exchange').setLevel(
|
logging.getLogger('ccxt.base.exchange').setLevel(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user