0

I'm using nodejs and mongodb, I wan to create a log system that stores data when mongoose fires queries(creating entry or update fields) so I can keep track of users.

is there a certain plugin for mongoose or I have to do my own system from scratch ?

Thanks in advance

1 Answer 1

1

Is this the sort of thing you were looking for?

https://www.npmjs.com/package/mongoose-history-log

Sign up to request clarification or add additional context in comments.

5 Comments

yes kind of, but I want something automatic, I have many collections , with your solution I have to change all my queries and push to history in every nodejs routes
I've not used it, but: npmjs.com/package/mongoose-history looks like it could be helpful
thank you that's what I'm looking for, please do you know if could store just changed data in case of update so I can store just changed fields instead of the whole Collection object ?
I haven't used it before so no, sorry
did you used it? so can I store just changed fields instead of the whole Collection object?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.