I want to keep track(by loging to another collection) on any Create , Update or Delete operation that happen in Mongodb.
My existing app (NodeJs) uses mongoose for repository. I'm trying to log every time something has changed(CUD) in the DB. Simple solution would be to add logs everywhere i modify to db, but i have so many methods.I wonder if i can "hook" on a post Save globally? something like middleware to Mongo.