Private
Public Access
Log every DM-email decision point (diagnostic follow-up to #66/#68)
A live "no emails arriving" report produced literally nothing in the logs, not even the SMTP-not-configured line -- this app has no logging config lowering the root level below Python's own WARNING default, so every .debug()/.info() call has been silently invisible in production all along. Bumped the SMTP-not-configured line to .warning, and added one at each early-return in _maybe_email_dm_notification (no other participant, recipient online, already has unread messages) plus a confirmation right before actually sending -- next attempt will show exactly which branch is being hit instead of nothing at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -221,7 +221,12 @@ async def send_email(
|
||||
"""
|
||||
cfg = await get_smtp_settings(db)
|
||||
if cfg is None:
|
||||
logger.debug("SMTP not configured; skipping email to %s", to_address)
|
||||
# WARNING, not .debug -- this app has no logging config lowering
|
||||
# the root level below Python's own WARNING default, so anything
|
||||
# below that is silently invisible in production (confirmed live:
|
||||
# a real "no emails arriving" report produced nothing in the logs
|
||||
# at all, this line included, even though it was relevant).
|
||||
logger.warning("SMTP not configured; skipping email to %s", to_address)
|
||||
return
|
||||
palette = await _resolve_palette(db, theme_user)
|
||||
html_body = _render_html(palette, subject, paragraphs, cta_label, cta_url)
|
||||
|
||||
Reference in New Issue
Block a user