1

当我启动连接到 mongodb 的节点服务器时,我总是会收到这些消息,告诉我连接的状态。如何禁用这些消息?

Wed Apr 24 13:28:17 [initandlisten] connection accepted from 127.0.0.1:55221 #304 (1 connection now open)
Wed Apr 24 13:28:17 [initandlisten] connection accepted from 127.0.0.1:55222 #305 (2 connections now open)
Wed Apr 24 13:28:17 [initandlisten] connection accepted from 127.0.0.1:55223 #306 (3 connections now open)
Wed Apr 24 13:28:17 [initandlisten] connection accepted from 127.0.0.1:55224 #307 (4 connections now open)
Wed Apr 24 13:28:17 [initandlisten] connection accepted from 127.0.0.1:55225 #308 (5 connections now open)
Wed Apr 24 13:35:42 [conn308] end connection 127.0.0.1:55225 (4 connections now open)
Wed Apr 24 13:35:42 [conn307] end connection 127.0.0.1:55224 (4 connections now open)
Wed Apr 24 13:35:42 [conn306] end connection 127.0.0.1:55223 (4 connections now open)
Wed Apr 24 13:35:42 [conn305] end connection 127.0.0.1:55222 (4 connections now open)
Wed Apr 24 13:35:42 [conn304] end connection 127.0.0.1:55221 (4 connections now open)
4

1 回答 1

3

此消息不是来自 node.js 或 node-mongodb-native 驱动程序。它来自 mongo 守护进程。

启动 mongo 时,只需传递 --quiet 选项,此消息就会消失。

于 2013-04-24T20:28:06.000 回答