如何将MongoDb的日志记录级别设置为info? [英] how do I set the logging level to info for MongoDb?

查看:1612
本文介绍了如何将MongoDb的日志记录级别设置为info?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在背面使用MongoDb的Rails应用程序.我的日志中有这些消息,说MONGODB [WARNING] Please note that logging negatively impacts client-side performance. You should set your logging level no lower than :info in production.好的,我从不担心它,但决定立即进行查找.

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. You should set your logging level no lower than :info in production in my logs. OK, I never worried about it but decided to look it up just now.

此mongo网站上的页面并未真正讨论日志记录级别,但是它确实讨论了-v-vvvv的详细程度.这和日志级别一样吗?如-vvvvv是否与调试日志级别相同,而-v是否与错误日志级别相同?该文档对此主题尚不清楚.

This page on the mongo site doesn't really discuss logging levels, but it does discuss -v vs -vvvv for verbosity. Is that the same thing as log level? As in -vvvvv is the same as a debug log level and -v is the same as an error log level? The docs are very unclear on this topic.

推荐答案

日志记录级别是指rails日志记录级别,而-v标志是指详细程度.

Logging levels refer to rails logging levels whereas the -v flag refers to verbosity.

Rails会自动将生产中的日志记录级别设置为高于开发中的日志记录级别,因此您无需担心任何事情.

Rails automatically sets the logging level higher in production than when in development so you shouldn't have anything to worry about.

这篇关于如何将MongoDb的日志记录级别设置为info?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆