I am storing user data in MongoDB and want to maintain activity logs for each user. eg:
- Who logged in and when?
- Which user perform certain and when they did
Also, Admin can query over these logs to search
I have certain approach where people suggested that these logs should be stored on persistent disk(log files) and then writing a script to update database from these log files.
I want to know what is a good practice to maintain audit logs. Also, using MongoDB to store all these events will fine?