Page MenuHomePhabricator

Email admins when errors are logged
Closed, DeclinedPublic

Description

Problem

Flask logs errors to stderr only, which is stored into a file by Toolforge's infrastructure. However, this file is examined only when users report an error, possibly missing other fatal errors.
 

Proposed solution

Examine how to make Flask send emails to the server admin when errors are logged, and add code for enabling this feature. Keep in mind this should be active at production-only.
 
Student is expected to upload a patch against labs/tools/massmailer repository at Wikimedia Gerrit. Student should claim Phabricator task while claiming task at the GCI site.
 

Materials

 

Event Timeline

Is there anything specific you can give at hand for the student to know, how to send an e-mail from Toolforge? Is it simply by using SMTP (where do the credentials come from?) or is it by an API? Any details from here would help a lot, I think :)