Enhance logging capabilities across multiple modules for version 4.5.0: Introduce detailed debug statements in decision_engine.py, retriever_scoring.py, retriever.py, and logging_setup.py to improve traceability during retrieval processes. Implement dynamic log level configuration based on environment variables, allowing for more flexible debugging and monitoring of application behavior.
This commit is contained in:
1 parent
2d87f9d816
commit
3e27c72b80
5 files changed
+112
-18
No files matched your search
@@ -71,11 +71,17 @@ from pathlib import Path
|
||||
from typing import List, Dict, Any
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Root Logger Setup: INFO-Level für volle Transparenz der fachlichen Prozesse
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s [%(levelname)s] %(message)s'
|
||||
)
|
||||
# Root Logger Setup: Nutzt zentrale setup_logging() Funktion
|
||||
# WP-24c v4.4.0-DEBUG: Aktiviert DEBUG-Level für End-to-End Tracing
|
||||
# Kann auch über Umgebungsvariable DEBUG=true gesteuert werden
|
||||
from app.core.logging_setup import setup_logging
|
||||
|
||||
# Bestimme Log-Level basierend auf DEBUG Umgebungsvariable
|
||||
debug_mode = os.getenv("DEBUG", "false").lower() == "true"
|
||||
log_level = logging.DEBUG if debug_mode else logging.INFO
|
||||
|
||||
# Nutze zentrale Logging-Konfiguration (File + Console)
|
||||
setup_logging(log_level=log_level)
|
||||
|
||||
# Sicherstellung, dass das Root-Verzeichnis im Python-Pfad liegt
|
||||
sys.path.append(os.getcwd())
|
||||
|
||||
Reference in new issue
Block a user