Implemented log with mongodb