Problem:
From the system profile, want to log client IP connection information.
Reproduce:
1. add data into a collection
> for (i=0; i < 100000; i++) { db.foo.insert(
{ author: 'jim', ts : new Date(i), tags : ["yes","no"] }); }
2. enable profiling
> db.setProfilingLevel(2);
3. perform a query
> db.foo.find(
{author:'jim'})
4. look at the profile information
> db.system.profile.find().sort(
{ts:-1});
{ "ts" : ISODate("2011-03-17T21:45:07.650Z"), "info" : "query test.foo reslen:36 nscanned:0 \nquery:
nreturned:0 bytes:20", "millis" : 65 }
Business Case:
Ease of use