This commit is contained in:
2025-04-19 07:17:29 +00:00
parent 4fdcdcf77a
commit 8c6866ca4b

View File

@@ -3982,21 +3982,21 @@ class DataProcessor:
def main():
global LOG_FILE
import logging
# Ganz am Anfang von main, vor dem ersten debug_print
log_level = logging.DEBUG # Explizit setzen
logging.basicConfig(level=log_level,
format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', # Name des Loggers hinzufügen
filename=LOG_FILE, # In Datei schreiben
filemode='a') # Anfügen
# Optional: Auch auf Konsole ausgeben
console_handler = logging.StreamHandler()
console_handler.setLevel(log_level)
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(name)s - %(message)s'))
logging.getLogger('').addHandler(console_handler)
# Ganz am Anfang von main, vor dem ersten debug_print
log_level = logging.DEBUG # Explizit setzen
logging.basicConfig(level=log_level,
format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', # Name des Loggers hinzufügen
filename=LOG_FILE, # In Datei schreiben
filemode='a') # Anfügen
# Optional: Auch auf Konsole ausgeben
console_handler = logging.StreamHandler()
console_handler.setLevel(log_level)
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(name)s - %(message)s'))
logging.getLogger('').addHandler(console_handler)
# Testnachricht nach Logging-Setup
logging.debug("DEBUG Logging ist konfiguriert.")
logging.info("INFO Logging ist konfiguriert.")
# Testnachricht nach Logging-Setup
logging.debug("DEBUG Logging ist konfiguriert.")
logging.info("INFO Logging ist konfiguriert.")
# --- Initialisierung ---
parser = argparse.ArgumentParser(description="Firmen-Datenanreicherungs-Skript")