Add support for historical logs in mongo
Add support for historical logs in sqlite