aspose file tools*
The moose likes Spring and the fly likes Spring Data Mongodb MongoDbUtils disable DEBUG Logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Data Mongodb MongoDbUtils disable DEBUG Logging" Watch "Spring Data Mongodb MongoDbUtils disable DEBUG Logging" New topic
Forums: Other Open Source Projects Spring Other Application Frameworks
Author

Spring Data Mongodb MongoDbUtils disable DEBUG Logging

Bill Moore
Greenhorn

Joined: May 14, 2014
Posts: 2


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
Bartender

Joined: Jan 17, 2008
Posts: 2402
    
  28

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
 
subject: Spring Data Mongodb MongoDbUtils disable DEBUG Logging