diff --git a/freqtrade/mixins/logging_mixin.py b/freqtrade/mixins/logging_mixin.py index 58399e738..91ad2c25e 100644 --- a/freqtrade/mixins/logging_mixin.py +++ b/freqtrade/mixins/logging_mixin.py @@ -20,12 +20,13 @@ class LoggingMixin: self.refresh_period = refresh_period self._log_cache: TTLCache = TTLCache(maxsize=1024, ttl=self.refresh_period) - def log_once(self, message: str, logmethod: Callable) -> None: + def log_once(self, message: str, logmethod: Callable, force_show: bool = False) -> None: """ Logs message - not more often than "refresh_period" to avoid log spamming Logs the log-message as debug as well to simplify debugging. :param message: String containing the message to be sent to the function. :param logmethod: Function that'll be called. Most likely `logger.info`. + :param force_show: If True, sends the message regardless of show_output value. :return: None. """ @@ -35,6 +36,7 @@ class LoggingMixin: # Log as debug first self.logger.debug(message) - # Call hidden function. - if self.show_output: + + # Call hidden function if show_output is True or force_show is True + if self.show_output or force_show: _log_once(message) diff --git a/freqtrade/plugins/pairlist/IPairList.py b/freqtrade/plugins/pairlist/IPairList.py index 89a9e68cd..9cb5d7744 100644 --- a/freqtrade/plugins/pairlist/IPairList.py +++ b/freqtrade/plugins/pairlist/IPairList.py @@ -251,6 +251,7 @@ class IPairList(LoggingMixin, ABC): f"Pair {pair} is not compatible with exchange " f"{self._exchange.name}. Removing it from whitelist..", logger.warning, + True, ) continue @@ -258,6 +259,7 @@ class IPairList(LoggingMixin, ABC): self.log_once( f"Pair {pair} is not tradable with Freqtrade. Removing it from whitelist..", logger.warning, + True, ) continue @@ -266,13 +268,18 @@ class IPairList(LoggingMixin, ABC): f"Pair {pair} is not compatible with your stake currency " f"{self._config['stake_currency']}. Removing it from whitelist..", logger.warning, + True, ) continue # Check if market is active market = markets[pair] if not market_is_active(market): - self.log_once(f"Ignoring {pair} from whitelist. Market is not active.", logger.info) + self.log_once( + f"Ignoring {pair} from whitelist. Market is not active.", + logger.info, + True, + ) continue if pair not in sanitized_whitelist: sanitized_whitelist.append(pair)