bugfix
This commit is contained in:
@@ -3981,6 +3981,22 @@ class DataProcessor:
|
|||||||
# ==================== MAIN FUNCTION ====================
|
# ==================== MAIN FUNCTION ====================
|
||||||
def main():
|
def main():
|
||||||
global LOG_FILE
|
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)
|
||||||
|
|
||||||
|
# Testnachricht nach Logging-Setup
|
||||||
|
logging.debug("DEBUG Logging ist konfiguriert.")
|
||||||
|
logging.info("INFO Logging ist konfiguriert.")
|
||||||
|
|
||||||
# --- Initialisierung ---
|
# --- Initialisierung ---
|
||||||
parser = argparse.ArgumentParser(description="Firmen-Datenanreicherungs-Skript")
|
parser = argparse.ArgumentParser(description="Firmen-Datenanreicherungs-Skript")
|
||||||
|
|||||||
Reference in New Issue
Block a user