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?
仅有的幸福2017-05-17 10:04:19
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...
習慣沉默2017-05-17 10:04:19
mongoose.set('debug', true);
During the debugging process, the console will output operation records.
巴扎黑2017-05-17 10:04:19
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!