我有一个bash脚本,它试图通过连接到副本集来监视集合中的文档数.
COUNT=`/bin/mongo --quiet --host $REPLICA_SET policy -u myuser -p mypwd --eval 'db.myColl.count()'`
Run Code Online (Sandbox Code Playgroud)
我期待只有一个数字作为输出,但我得到:
Mon Apr 27 13:33:57.716 starting new replica set monitor for replica set xx wit h seed of xxx
Mon Apr 27 13:33:57.719 succes sfully connected to seed xx for replica set xx
Mon Apr 27 13:33:57.719 changing hosts to ...
...
Mon Apr 27 13:33:57.736 [ReplicaSetMonitorWatcher] starting 3043
Run Code Online (Sandbox Code Playgroud)
谁能告诉我如何禁用这一堆输出?谢谢.
我在Intellij(Linux上的13.1.5)上使用bootRun任务运行一个spring启动应用程序,我试图在生命周期回调中关闭一个监听器线程,但是当在Intellij中停止应用程序时,我发现我的监听器线程仍然是运行和记录.
"与目标虚拟机断开连接,地址:...,传输:'socket'6:39:22 AM:外部任务执行完成'bootRun'."
"2016-03-28 06:39:59.606 INFO 7740 --- [Thread-1] ationConfigEmbeddedWebApplicationContext:关闭org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@657617e6:... 2016-03-28 06:39: 59.611 INFO 7740 --- [Thread-1] osjeaAnnotationMBeanExporter:在关闭时取消注册JMX暴露的bean"
我的问题: