metachris/logzero

Can we log to database?

ruipacheco opened this issue · 1 comments

Is there a way to redirect logs to a database? Bonus points if we can use SQLAlchemy or Django ORM.

Hello,

Good question. logzero simply supports all Python logging handlers: https://docs.python.org/2/library/logging.handlers.html

Take a look if any of them works for you. You can also write your own handler that logs to a database , see these threads as starting points:

Would be happy to add some documentation if you want to contribute ;)