Open tomdoel opened 5 years ago
Should also configure the ADMINS
variable to send admins 500 error messages
I think it is worth configuring this because we would then get email records of any server errors that occur during classification. We need to link this to a Turing email server, or possibly install an email server on the VM as I don't believe Azure App Service has email serving by default.
Configuring in Django: https://docs.djangoproject.com/en/2.2/howto/error-reporting/
Required work:
.env
file (and update the example .env.example
file) for setting a list of system admin email addressesprovision.sh
to set this setting on the Azure appbase.py
to read in this setting and use it to set Django's ADMINS
and MANAGERS
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend
to base.py
(note log setting in local.py
- you may wish to remove this, or to set a logging backend if no email is specified for development environments).env
file
The Django logging is configured to stream warnings and errors to stdout so they are picked up by the Azure log stream.
An additional handler can be added to email the system manager in error situations.