turning off DEBUG configuration

12 views
Skip to first unread message

Siddhartha Gadgil

unread,
Aug 24, 2015, 11:30:07 PM8/24/15
to ReactiveMongo - http://reactivemongo.org
Dear All,
       I was trying to run reactivemongo from the sbt shell, and I keep getting debug notifications that the connection is alive. I have no java experience (especially not configuration), and all I could track down did not help me turn off these messages. As I could not figure out where my application.conf  is supposed to be (I have a multi-project build, one of which is a play server but I am trying to use reactive-mongo outside it), I even tried directly setting configuration variables as below. Here is my attempt. Could someone tell me which variable I should set, and if my basic approach is okay? Any help appreciated.

Siddhartha


  val conf = ConfigFactory.load("hub.conf") // a conf file in /mantle/src/main/resources where mantle is my project directory, seems to be ignored

  val cnf = conf.
    withValue("akka.loglevel", ConfigValueFactory.fromAnyRef("INFO")).
     withValue("logger.reactivemongo", ConfigValueFactory.fromAnyRef("INFO")).
     withValue("mongo-async-driver.akka.loglevel", ConfigValueFactory.fromAnyRef("INFO"))

 

  val driver = new MongoDriver(Some(cnf))
  val connection = driver.connection(List("localhost"))

Reply all
Reply to author
Forward
0 new messages