Can we log to database?
ruipacheco opened this issue · 1 comments
ruipacheco commented
Is there a way to redirect logs to a database? Bonus points if we can use SQLAlchemy or Django ORM.
metachris commented
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:
- https://stackoverflow.com/questions/2314307/python-logging-to-database
- https://github.com/onemoretime/mySQLHandler
Would be happy to add some documentation if you want to contribute ;)