Skip to content

Commit ddb4235

Browse files
ihmilytiangolo
andauthored
🔊 Enable logging for email utils by default (#1374)
Co-authored-by: Sebastián Ramírez <[email protected]>
1 parent 2939b77 commit ddb4235

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/app/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
from app.core.config import settings
1313

14+
logging.basicConfig(level=logging.INFO)
15+
logger = logging.getLogger(__name__)
16+
1417

1518
@dataclass
1619
class EmailData:
@@ -48,7 +51,7 @@ def send_email(
4851
if settings.SMTP_PASSWORD:
4952
smtp_options["password"] = settings.SMTP_PASSWORD
5053
response = message.send(to=email_to, smtp=smtp_options)
51-
logging.info(f"send email result: {response}")
54+
logger.info(f"send email result: {response}")
5255

5356

5457
def generate_test_email(email_to: str) -> EmailData:

0 commit comments

Comments
 (0)