From 2cd54a59333feafbf64a664fe151a199e91a8ce4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 19 Nov 2020 20:06:13 +0100 Subject: [PATCH] Allow disabling output from plugins --- freqtrade/mixins/logging_mixin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/freqtrade/mixins/logging_mixin.py b/freqtrade/mixins/logging_mixin.py index db2307ad3..a8dec2da7 100644 --- a/freqtrade/mixins/logging_mixin.py +++ b/freqtrade/mixins/logging_mixin.py @@ -8,6 +8,9 @@ class LoggingMixin(): Logging Mixin Shows similar messages only once every `refresh_period`. """ + # Disable output completely + show_output = True + def __init__(self, logger, refresh_period: int = 3600): """ :param refresh_period: in seconds - Show identical messages in this intervals @@ -31,4 +34,5 @@ class LoggingMixin(): # Log as debug first self.logger.debug(message) # Call hidden function. - _log_once(message) + if self.show_output: + _log_once(message)