You can enable debug mode like so:
mongoose.set('debug', true);
or add your own debug callback:
mongoose.set('debug', function (coll, method, query, doc [, options]) {
//do your thing
});
This will log all executed collection methods and their arguments to the console.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…