当我启动连接到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)
答案 0 :(得分:3)
此消息不是来自node.js或node-mongodb-native驱动程序。它来自mongo守护进程。
当启动mongo时,只需传递--quiet选项,此消息就会消失。