I have a nodejs-express-mongoose application and I want to set logging system up.
I know about connect.logger() middleware but I want to log into MongoDB database.
Can I achieve that by using overriding connect.logger() middleware of are some express plugins for my purposes?
mongoose has a
debugoption that logs all collection method invocations (update, insert, find, ensureIndex, etc) withconsole.error. you may also override it with your own custom function: