From f71d86fce712b62ce83a9ed2ace5e2e45e2316ad Mon Sep 17 00:00:00 2001 From: agatha Date: Sat, 7 Sep 2024 16:31:57 -0400 Subject: [PATCH] chore: log warning when config cannot be loaded --- server/src/utils/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/utils/config.py b/server/src/utils/config.py index bf7669e..d8509d4 100644 --- a/server/src/utils/config.py +++ b/server/src/utils/config.py @@ -1,5 +1,7 @@ import yaml +from loguru import logger + def load_yaml_config(file_path): """ @@ -19,8 +21,8 @@ def load_yaml_config(file_path): try: with open(file_path, "r", encoding="utf-8") as f: config = yaml.safe_load(f) - except Exception: - # TODO: Log error + except Exception as e: + logger.warning(f"Error loading {file_path}: {e}") config = { "host": "0.0.0.0", "port": 9999