Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
hippocritical
2023-06-11 00:20:02 +02:00
2 changed files with 8 additions and 7 deletions

View File

@@ -50,6 +50,6 @@ def restore_verbosity_for_bias_tester() -> None:
Restore verbosity after bias tester.
"""
logger.info("Restoring log verbosity.")
log_level = logging.getLogger('freqtrade').getEffectiveLevel()
log_level = logging.NOTSET
for logger_name in __BIAS_TESTER_LOGGERS:
logging.getLogger(logger_name).setLevel(log_level)

View File

@@ -133,16 +133,17 @@ def test_set_loggers_journald_importerror(import_fails):
def test_reduce_verbosity():
setup_logging_pre()
reduce_verbosity_for_bias_tester()
assert logging.getLogger('freqtrade.resolvers').level is logging.WARNING
assert logging.getLogger('freqtrade.strategy.hyper').level is logging.WARNING
assert logging.getLogger('freqtrade.resolvers').getEffectiveLevel() is logging.WARNING
assert logging.getLogger('freqtrade.strategy.hyper').getEffectiveLevel() is logging.WARNING
# base level wasn't changed
assert logging.getLogger('freqtrade').level is logging.INFO
assert logging.getLogger('freqtrade').getEffectiveLevel() is logging.INFO
restore_verbosity_for_bias_tester()
assert logging.getLogger('freqtrade.resolvers').level is logging.INFO
assert logging.getLogger('freqtrade.strategy.hyper').level is logging.INFO
assert logging.getLogger('freqtrade').level is logging.INFO
assert logging.getLogger('freqtrade.resolvers').getEffectiveLevel() is logging.INFO
assert logging.getLogger('freqtrade.strategy.hyper').getEffectiveLevel() is logging.INFO
assert logging.getLogger('freqtrade').getEffectiveLevel() is logging.INFO
# base level wasn't changed