Skip to content

Commit

Permalink
limit debug output in email_publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
multiflexi committed Oct 29, 2024
1 parent 38172b4 commit b06f0e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/publishers/publishers/email_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b06f0e8

Please sign in to comment.