mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
26 lines
745 B
Python
26 lines
745 B
Python
|
|
import logging
|
|
|
|
|
|
def set_loggers(verbosity: int = 0, api_verbosity: str = 'info') -> None:
|
|
"""
|
|
Set the logging level for third party libraries
|
|
:return: None
|
|
"""
|
|
|
|
logging.getLogger('requests').setLevel(
|
|
logging.INFO if verbosity <= 1 else logging.DEBUG
|
|
)
|
|
logging.getLogger("urllib3").setLevel(
|
|
logging.INFO if verbosity <= 1 else logging.DEBUG
|
|
)
|
|
logging.getLogger('ccxt.base.exchange').setLevel(
|
|
logging.INFO if verbosity <= 2 else logging.DEBUG
|
|
)
|
|
logging.getLogger('telegram').setLevel(logging.INFO)
|
|
logging.getLogger('httpx').setLevel(logging.WARNING)
|
|
|
|
logging.getLogger('werkzeug').setLevel(
|
|
logging.ERROR if api_verbosity == 'error' else logging.INFO
|
|
)
|