From 921e59519652c4bf14e5ac5bfba7b5f3045a3ee3 Mon Sep 17 00:00:00 2001 From: Floke Date: Wed, 7 May 2025 09:47:46 +0000 Subject: [PATCH] bugfix --- brancheneinstufung.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/brancheneinstufung.py b/brancheneinstufung.py index ccf80d15..6d01a0f0 100644 --- a/brancheneinstufung.py +++ b/brancheneinstufung.py @@ -11180,16 +11180,13 @@ def main(): """ # WICHTIG: Globale Variable LOG_FILE wird benoetigt (Initialisierung Block 3) global LOG_FILE + logger = logging.getLogger(__name__) # <<< JETZT AN DER RICHTIGEN STELLE # --- Initial Logging Setup (Konfiguration von Level und Format) --- # Diese Konfiguration wird wirksam, sobald die Handler hinzugefuegt werden. # Standard-Logging Level festlegen (aus Config Block 1) log_level = logging.DEBUG if getattr(Config, 'DEBUG', False) else logging.INFO - log_format = '%(asctime)s - %(levelname)-8s - %(name)-25s - %(message)s' # Angepasstes Format mit breiterem Namen - - # Root-Logger konfigurieren (mit Console Handler, File Handler wird spaeter hinzugefuegt) - # handlers=[] verhindert default Console Handler, wir fuegen ihn manuell hinzu fuer mehr Kontrolle - logging.basicConfig(level=log_level, format=log_format, handlers=[]) + # ... (Rest des Logging Setups bleibt gleich) ... # Console Handler explizit hinzufuegen console_handler = logging.StreamHandler() @@ -11201,7 +11198,7 @@ def main(): # Testnachricht (geht nur an Konsole, da File Handler noch fehlt) - logger.debug("DEBUG Logging initial konfiguriert (nur Konsole).") + logger.debug("DEBUG Logging initial konfiguriert (nur Konsole).") # Jetzt sollte logger definiert sein logger.info("INFO Logging initial konfiguriert (nur Konsole).")