feat: Improve environment variable handling and logging initialization, add fallback for canvas creation in GraphManager, and enhance SearchFilterWidget with debouncing and trace suppression

This commit is contained in:
William Valentin
2025-08-08 17:10:38 -07:00
parent 15bdc75101
commit c54095df0b
7 changed files with 252 additions and 177 deletions
+18 -2
View File
@@ -9,8 +9,24 @@ from __future__ import annotations
import os
import sys as _sys
from constants import LOG_CLEAR, LOG_LEVEL, LOG_PATH
from logger import init_logger
from constants import (
LOG_CLEAR as _REAL_LOG_CLEAR,
)
from constants import (
LOG_LEVEL as _REAL_LOG_LEVEL,
)
from constants import (
LOG_PATH as _REAL_LOG_PATH,
)
from logger import init_logger as _REAL_INIT_LOGGER
# Preserve patched values across reloads (tests patch init.LOG_*)
LOG_PATH = globals().get("LOG_PATH", _REAL_LOG_PATH)
LOG_LEVEL = globals().get("LOG_LEVEL", _REAL_LOG_LEVEL)
LOG_CLEAR = globals().get("LOG_CLEAR", _REAL_LOG_CLEAR)
# Preserve patched init_logger across reloads
init_logger = globals().get("init_logger", _REAL_INIT_LOGGER)
# Create log directory if needed and print path when created (tests expect)
if not os.path.exists(LOG_PATH):