From bf46be5cbc9c9053d00f5f3d17c0613dda5acb22 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Thu, 21 Dec 2023 10:40:51 -0700 Subject: [PATCH] Change log level --- src/registrar/utility/email.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/registrar/utility/email.py b/src/registrar/utility/email.py index 110ae117e..cb1550801 100644 --- a/src/registrar/utility/email.py +++ b/src/registrar/utility/email.py @@ -1,11 +1,13 @@ """Utilities for sending emails.""" import boto3 - +import logging from django.conf import settings from django.template.loader import get_template +logger = logging.getLogger(__name__) + class EmailSendingError(RuntimeError): """Local error for handling all failures when sending email.""" @@ -20,7 +22,7 @@ def send_templated_email(template_name: str, subject_template_name: str, to_addr context as Django's HTML templates. context gives additional information that the template may use. """ - print(f"An email was sent! Template name: {template_name} to {to_address}") + logger.info(f"An email was sent! Template name: {template_name} to {to_address}") template = get_template(template_name) email_body = template.render(context=context)