File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Data Mongodb MongoDbUtils disable DEBUG Logging

 
Bill Moore
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


How can I disable the following logging from org.springframework.data.mongodb.core.MongoDbUtils:

DEBUG o.s.data.mongodb.core.MongoDbUtils - Getting Mongo Database name=[erepprod]

I have tried the following in my log4j.properties file:

log4j.category.org.springframework.data.mongodb.core.MongoDbUtils=ERROR,console log4j.logger.org.springframework.data.mongodb.core.MongoDbUtils=ERROR,console

But the message is still being logged.

Any help would be appreciated as I have spent two days trying to get rid of this message.
 
Jayesh A Lalwani
Rancher
Pie
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are your class names obfuscated? If the class names are obfuscated, you need to make sure you use the obfuscated class names in log4j.properties too. So, if the MongoDBUtils class is using the logger named o.s.data.mongodb.core.MongoDBUtils, then in your properties file, you should put log4j.category.o.s.data.mongodb.core.MongoDBUtils.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic