From 4898b0d5b1ae4f734f509034b3c699f2b2930780 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Wed, 10 Apr 2024 14:18:19 +0200 Subject: [PATCH] feat: disable debug on deploy --- music_kraken/utils/__init__.py | 4 ++-- music_kraken/utils/shared.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/music_kraken/utils/__init__.py b/music_kraken/utils/__init__.py index 8018526..6b4754e 100644 --- a/music_kraken/utils/__init__.py +++ b/music_kraken/utils/__init__.py @@ -47,8 +47,8 @@ def dump_to_file(file_name: str, payload: str, is_json: bool = False, exit_after def trace(msg: str): - if DEBUG_TRACE: - logging.debug(msg) + if not DEBUG_TRACE: + return output("trace: " + msg, BColors.OKBLUE) diff --git a/music_kraken/utils/shared.py b/music_kraken/utils/shared.py index 3e79a29..cf3cda7 100644 --- a/music_kraken/utils/shared.py +++ b/music_kraken/utils/shared.py @@ -12,7 +12,7 @@ if not load_dotenv(Path(__file__).parent.parent.parent / ".env"): __stage__ = os.getenv("STAGE", "prod") -DEBUG = __stage__ == "dev" and True +DEBUG = (__stage__ == "dev") and True DEBUG_LOGGING = DEBUG and False DEBUG_TRACE = DEBUG and True DEBUG_YOUTUBE_INITIALIZING = DEBUG and False