当我启动连接到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)发布于 2013-04-25 04:28:06
此消息不是来自node.js或node-mongodb本机驱动程序。它来自mongo守护进程。
启动mongo时,只需传递--quiet选项,此消息就会消失。
https://stackoverflow.com/questions/16200719
复制相似问题