python - Error E-Mails in Tornado -
python - Error E-Mails in Tornado -
i running project in tornado, prefer not check log files regularly uncaught errors , have "email someone" or "store in db" (preferred mongodb).
tornado doesn't seems have (at to the lowest degree in documentation) method this. there way this?
you create many custom exceptions handlers:
the first stores serialized exception mongo (using motor) the second, email serialized exception, via logging.handlers.smtphandler.have to: https://docs.python.org/2/library/logging.handlers.html
how do, in tornado apps:
create applicationexception class stores content of traceback string save applicationexception instances generated on runtime code on exception cassandra or mongo, using save method of applicationexception class send via email, specific applicationexception subclass objects using smtp handleri utilize this, when implementing tornado based client / server solution, can send applicationexception objects json on https, server, can decode , store in db / email admins.
all can quite long larn , implement, worth doing it.
python tornado
Comments
Post a Comment