Miksus/red-mail

ENH: Logging Handlers

Miksus opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
Even though the logging library has SMTPHandler, one might prefer to have more control and more customizable logging messages. For this purpose, it could be useful to implement such handlers from Red Mail also.

Describe the solution you'd like
Possibly two handlers: EmailHandler and MultiEmailHandler. The first one would send emails from each log record while the latter would send emails after n log records or after other condition is fulfilled.

Describe alternatives you've considered
One can also subclass the logging.Handler and logging.handlers.BufferingHandler by themselves and implement such their own.

Additional context
See: