how do I set the logging level to info for MongoDb?

前端 未结 3 650
无人共我
无人共我 2021-01-05 15:21

I have a Rails app that uses MongoDb on the back. I have these messages that say MONGODB [WARNING] Please note that logging negatively impacts client-side performance.

3条回答
  •  心在旅途
    2021-01-05 16:12

    I had problems with this in my tests, so I ended up doing the following in my spec_helper.rb:

    Mongoid.logger.level = Logger::INFO
    

    However if you are inside of rails you should probably (untested) use this to access the logger instead:

    config.mongoid.logger
    

提交回复
热议问题