bugfix
This commit is contained in:
@@ -3982,21 +3982,21 @@ class DataProcessor:
|
|||||||
def main():
|
def main():
|
||||||
global LOG_FILE
|
global LOG_FILE
|
||||||
import logging
|
import logging
|
||||||
# Ganz am Anfang von main, vor dem ersten debug_print
|
# Ganz am Anfang von main, vor dem ersten debug_print
|
||||||
log_level = logging.DEBUG # Explizit setzen
|
log_level = logging.DEBUG # Explizit setzen
|
||||||
logging.basicConfig(level=log_level,
|
logging.basicConfig(level=log_level,
|
||||||
format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', # Name des Loggers hinzufügen
|
format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', # Name des Loggers hinzufügen
|
||||||
filename=LOG_FILE, # In Datei schreiben
|
filename=LOG_FILE, # In Datei schreiben
|
||||||
filemode='a') # Anfügen
|
filemode='a') # Anfügen
|
||||||
# Optional: Auch auf Konsole ausgeben
|
# Optional: Auch auf Konsole ausgeben
|
||||||
console_handler = logging.StreamHandler()
|
console_handler = logging.StreamHandler()
|
||||||
console_handler.setLevel(log_level)
|
console_handler.setLevel(log_level)
|
||||||
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(name)s - %(message)s'))
|
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(name)s - %(message)s'))
|
||||||
logging.getLogger('').addHandler(console_handler)
|
logging.getLogger('').addHandler(console_handler)
|
||||||
|
|
||||||
# Testnachricht nach Logging-Setup
|
# Testnachricht nach Logging-Setup
|
||||||
logging.debug("DEBUG Logging ist konfiguriert.")
|
logging.debug("DEBUG Logging ist konfiguriert.")
|
||||||
logging.info("INFO 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