From b06f0e847d3a94a44e7bf977d8218cdd0001115a Mon Sep 17 00:00:00 2001 From: multiflexi Date: Tue, 29 Oct 2024 17:04:30 +0100 Subject: [PATCH] limit debug output in email_publisher --- src/publishers/publishers/email_publisher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/publishers/publishers/email_publisher.py b/src/publishers/publishers/email_publisher.py index e22ec7c2..b93cd90c 100644 --- a/src/publishers/publishers/email_publisher.py +++ b/src/publishers/publishers/email_publisher.py @@ -119,7 +119,10 @@ def publish(self, publisher_input): logger.info(f"Encrypting email with file {encrypt}") envelope.encryption(key=open(encrypt)) - logger.debug(f"=== COMPOSED FOLLOWING EMAIL ===\n{envelope}") + email_string = str(envelope) + if len(email_string) > 3000: + email_string = f"{email_string[:3000]}\n..." + logger.debug(f"=== COMPOSED FOLLOWING EMAIL ===\n{email_string}") envelope.smtp(smtp) try: