I\'m seeking a way to let the python logger module to log to database and falls back to file system when the db is down.
So basically 2 things: How to let the logger
Old question, but dropping this for others. If you want to use python logging, you can add two handlers. One for writing to file, a rotating file handler. This is robust, and can be done regardless if the dB is up or not. The other one can write to another service/module, like a pymongo integration.
Look up logging.config on how to setup your handlers from code or json.