diff options
author | 2022-02-14 23:41:14 +0000 | |
---|---|---|
committer | 2022-02-14 23:41:14 +0000 | |
commit | 657aaf5f613b0bd219d67c71f7dc37ede0bb6aab (patch) | |
tree | 548e48ae21a98d5e6e16e8619d1af4ee75fe8b7a /bot/log.py | |
parent | fix: Add newlines in codeblock formatting (diff) | |
parent | Merge pull request #1026 from Shom770/fix-trivia-night (diff) |
Merge branch 'main' into merge-github-issues
Diffstat (limited to 'bot/log.py')
-rw-r--r-- | bot/log.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -6,7 +6,7 @@ from pathlib import Path import coloredlogs -from bot.constants import Client +from bot.constants import Logging def setup() -> None: @@ -20,7 +20,7 @@ def setup() -> None: log_format = logging.Formatter(format_string) root_logger = logging.getLogger() - if Client.file_logs: + if Logging.file_logs: # Set up file logging log_file = Path("logs/sir-lancebot.log") log_file.parent.mkdir(exist_ok=True) @@ -45,7 +45,7 @@ def setup() -> None: coloredlogs.install(level=logging.TRACE, stream=sys.stdout) - root_logger.setLevel(logging.DEBUG if Client.debug else logging.INFO) + root_logger.setLevel(logging.DEBUG if Logging.debug else logging.INFO) # Silence irrelevant loggers logging.getLogger("discord").setLevel(logging.ERROR) logging.getLogger("websockets").setLevel(logging.ERROR) @@ -81,7 +81,7 @@ def _set_trace_loggers() -> None: Otherwise if the env var begins with a "*", the root logger is set to the trace level and other contents are ignored. """ - level_filter = Client.trace_loggers + level_filter = Logging.trace_loggers if level_filter: if level_filter.startswith("*"): logging.getLogger().setLevel(logging.TRACE) |