MongoDB logging all queries -


the question basic simple... how log queries in "tail"able log file in mongodb?

i have tried:

  • setting profiling level
  • setting slow ms parameter starting
  • mongod -vv option

the /var/log/mongodb/mongodb.log keeps showing current number of active connections...

you can log queries:

$ mongo mongodb shell version: 2.4.9 connecting to: test > use mydb switched db mydb > db.getprofilinglevel() 0 > db.setprofilinglevel(2) { "was" : 0, "slowms" : 1, "ok" : 1 } > db.getprofilinglevel() 2 > db.system.profile.find().pretty() 

source: http://docs.mongodb.org/manual/reference/method/db.setprofilinglevel/

db.setprofilinglevel(2) means log operations.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -