I have actually got the steps to follow to create the custom logger from the below link:
Python: custom logging across all modules
But how do i actually store the logs in Mongodb and pull it and post it on my front end.