Skip to content

Commit

Permalink
additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi committed Oct 14, 2022
1 parent df3b5a8 commit 2398986
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion superset/reports/notifications/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def send(self) -> None:
dryrun=False,
header_data=content.header_data,
)
logger.info("Report sent to email")
logger.info(
"Report sent to email, notification content is %s", content.header_data
)
except Exception as ex:
raise NotificationError(ex) from ex
6 changes: 4 additions & 2 deletions superset/utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,9 @@ def send_mime_email(
smpt_ssl_server_auth = config["SMTP_SSL_SERVER_AUTH"]

if dryrun:
logger.info("Dryrun enabled, email notification content is below:")
logger.info(mime_msg.as_string())
logger.info(
"Dryrun enabled, email notification content is %s", mime_msg.as_string()
)
return

# Default ssl context is SERVER_AUTH using the default system
Expand All @@ -1020,6 +1021,7 @@ def send_mime_email(
if smtp_user and smtp_password:
smtp.login(smtp_user, smtp_password)
logger.debug("Sent an email to %s", str(e_to))
logger.info("Sent email notification content is %s", mime_msg.as_string())
smtp.sendmail(e_from, e_to, mime_msg.as_string())
smtp.quit()

Expand Down

0 comments on commit 2398986

Please sign in to comment.