[SERVER-3847] db.setProfilingLevel(2) doesn't log what was inserted Created: 14/Sep/11  Updated: 16/Nov/21  Resolved: 14/Sep/11

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: 2.0.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Russell Smith Assignee: Unassigned
Resolution: Done Votes: 0
Labels: profiling
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS X 10.7, MongoDB 2.0, though it did the same on 1.8


Issue Links:
Duplicate
duplicates SERVER-3848 Log doc during insert in system.profi... Closed
Operating System: ALL
Participants:

 Description   

> use profilingtest
switched to db profilingtest
> db.setProfilingLevel(2);

{ "was" : 0, "slowms" : 100, "ok" : 1 }

> db.getProfilingLevel()
2
> db.somecollection.insert(

{cheese: true}

)
> db.somecollection.findOne()

{ "_id" : ObjectId("4e7084af0c324c44055b5180"), "cheese" : true }

> db.system.profile.find()
{ "ts" : ISODate("2011-09-14T10:40:23.391Z"), "info" : "query profilingtest.$cmd ntoreturn:1 command:

{ profile: -1.0 }

reslen:74 bytes:58", "millis" : 0 }

{ "ts" : ISODate("2011-09-14T10:40:47.091Z"), "info" : "insert profilingtest.somecollection", "millis" : 2 }

{ "ts" : ISODate("2011-09-14T10:40:54.220Z"), "info" : "query profilingtest.somecollection ntoreturn:1 reslen:67 nscanned:1 \nquery: {} nreturned:1 bytes:51", "millis" : 0 }



 Comments   
Comment by Scott Hernandez (Inactive) [ 14/Sep/11 ]

The output is from 1.8; I have created a new issue for what you want: SERVER-3848

Comment by Russell Smith [ 14/Sep/11 ]

BTW: Currently my work around is to parse data from mongosniff;

127.0.0.1:55917 -->> 127.0.0.1:27017 profilingtest.somecollection 80 bytes id:47 71
insert:

{ _id: ObjectId('4e7085080c324c44055b5181'), cheese: true }

Which works nicely

Generated at Thu Feb 08 03:04:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.