better logging

This commit is contained in:
Andreas Knuth 2026-02-10 18:22:31 -06:00
parent 494bfd6a10
commit 663faa6a08
1 changed files with 10 additions and 2 deletions

View File

@ -149,8 +149,16 @@ class MessageProcessor:
raw_bytes = parsed.as_bytes() raw_bytes = parsed.as_bytes()
except Exception as e: except Exception as e:
log(f"⚠ Parsing/Logic Error: {e}. Sending original.", 'WARNING', worker_name) # --- VERBESSERTES ERROR LOGGING ---
traceback.print_exc() error_msg = f"⚠ Parsing/Logic Error: {e}. Sending original."
log(error_msg, 'WARNING', worker_name)
# Den vollen Traceback ins Log schreiben (als ERROR markiert)
tb_str = traceback.format_exc()
log(f"Full Traceback:\n{tb_str}", 'ERROR', worker_name)
# ----------------------------------
# Fallback: Wir versuchen trotzdem, die Original-Mail zuzustellen
from_addr_final = from_addr from_addr_final = from_addr
is_bounce = False is_bounce = False
skip_rules = False skip_rules = False