From b794b02c4aa81218500151fde53e95d8c10c9817 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sat, 20 Nov 2021 23:10:57 +0300 Subject: Disable File Logging By Default Place logging to file behind an environment variable. Signed-off-by: Hassan Abouelela --- bot/log.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bot/log.py') diff --git a/bot/log.py b/bot/log.py index 97561be4..29e696e0 100644 --- a/bot/log.py +++ b/bot/log.py @@ -20,10 +20,7 @@ def setup() -> None: log_format = logging.Formatter(format_string) root_logger = logging.getLogger() - # Copied from constants file, which we can't import yet since loggers aren't instantiated - debug = os.environ.get("BOT_DEBUG", "true").lower() == "true" - - if debug: + if Client.file_logs: # Set up file logging log_file = Path("logs/sir-lancebot.log") log_file.parent.mkdir(exist_ok=True) -- cgit v1.2.3