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