Can you find the statements that perform additions, deletions, and modifications in the MongoDB log? Similar to mysql's binlog
I only found some connection information in mongodb.log and no logs of additions, deletions and modifications
I want to get the statements executed by the database during a period of time. I don't know whether there are statements or what exists. place?
1.set the profiling level db.setProfilingLevel(2)
2.Check Profiling Level db.getProfilingStatus() result { "was" : 2, "slowms" : 100 }
3.get logresult db.system.profile.find()
refer to: https://docs.mongodb.com/manu...
mongoose.set('debug', true);
During the debugging process, the console will output operation records.
In Replication environment, access local oplog.rs;
In a stand-alone environment, you need to convert it to a single-Master Replication environment in order to have oplog.rs.
For reference.
Love MongoDB! Have fun!