chore: log warning when config cannot be loaded
This commit is contained in:
parent
a3329c0a7f
commit
f71d86fce7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user