Lots of "Resolving database..." messages

111 views
Skip to first unread message

Szabo Akos

unread,
Jul 8, 2016, 7:35:24 AM7/8/16
to ReactiveMongo - http://reactivemongo.org
Hi!

My question is about logging. When running database operations of any kind the following is logged:

[info] 2016-07-08 12:33:55,006 application - Resolving database...

The possible flaw is that in a heavily loaded environment the log will be full of useless messages. I think that the "info" level is too strong to log this kind of event. Turning off logging is not a good solution, either.

Or am I using bad configuration parameters or is there a smarter way to lookup database? I'm using db the following way:

class MongoDao @Inject()(val reactiveMongoApi: ReactiveMongoApi) {
 
def collFut = reactiveMongoApi.database.map(_.collection[JSONCollection]("collection"))

 
def find(id: UUID): Future[Option[Data]] =
   
for {
      coll
<- collFut
      data
<- coll.find(Json.obj("id" -> id)).one[Data]
   
} yield data
}


Thanks,
Akos

Cédric Chantepie

unread,
Jul 8, 2016, 7:49:42 AM7/8/16
to ReactiveMongo - http://reactivemongo.org
Hi,

You can raise a improvement ticket on the tracker, with reference to this topic.

Best regards
Reply all
Reply to author
Forward
0 new messages