Implement API log, implementing with MongoDB