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:
+18
-2
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user