Log the time taken for e-mails to go out.

Review Request #14367 — Created March 13, 2025 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

To help diagnose e-mail-related issues, EmailMessage.send() now logs
the time taken for the e-mails to go out. This logs the recipient
message and the subject, to help identify the message.

This is all logged as debug logs, so in production this shouldn't create
too much additional noise unless debug messages are needed. However, it
will make it clear via warning and critical logs if there are delays
with sending.

Unit tests pass.

Tested this with some e-mail sending code in Review Board, verifying the
log messages.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Log the time taken for e-mails to go out.
To help diagnose e-mail-related issues, `EmailMessage.send()` now logs the time taken for the e-mails to go out. This logs the recipient message and the subject, to help identify the message. This is all logged as debug logs, so in production this shouldn't create too much additional noise unless debug messages are needed. However, it will make it clear via warning and critical logs if there are delays with sending.
1a2ee89bbd94db8bd5a4a61370bb1d2e1b9159f9 Christian Hammond
djblets/mail/message.py
Loading...