Adding functionality to save logs to mongodb

I think this would be good if add ability to save logs on mongodb