Update logging levels in ingestion_processor.py and import_markdown.py for improved visibility
Change debug logs to info and warning levels in ingestion_processor.py to enhance the visibility of change detection processes, including hash comparisons and artifact checks. Additionally, ensure .env is loaded before logging setup in import_markdown.py to correctly read the DEBUG environment variable. These adjustments aim to improve traceability and debugging during ingestion workflows.
This commit is contained in:
1 parent
7cb8fd6602
commit
de5db09b51
2 files changed
+31
-22
No files matched your search
@@ -71,12 +71,15 @@ from pathlib import Path
|
||||
from typing import List, Dict, Any
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# WP-24c v4.5.9: Lade .env VOR dem Logging-Setup, damit DEBUG=true korrekt gelesen wird
|
||||
load_dotenv()
|
||||
|
||||
# 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
|
||||
# Bestimme Log-Level basierend auf DEBUG Umgebungsvariable (nach load_dotenv!)
|
||||
debug_mode = os.getenv("DEBUG", "false").lower() == "true"
|
||||
log_level = logging.DEBUG if debug_mode else logging.INFO
|
||||
|
||||
@@ -234,7 +237,8 @@ async def main_async(args):
|
||||
|
||||
def main():
|
||||
"""Einstiegspunkt und Argument-Parsing."""
|
||||
load_dotenv()
|
||||
# WP-24c v4.5.9: load_dotenv() wurde bereits beim Modul-Import aufgerufen
|
||||
# (oben, vor dem Logging-Setup, damit DEBUG=true korrekt gelesen wird)
|
||||
|
||||
# Standard-Präfix aus Umgebungsvariable oder Fallback
|
||||
default_prefix = os.getenv("COLLECTION_PREFIX", "mindnet")
|
||||
|
||||
Reference in new issue
Block a user