wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 1


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: 2273
    
  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
 
Similar Threads
Not able to save logs into .log file
No debug log but has Info log, Spring MVC deployed to WL 12C
Logging into database
log4j.properties in unix
How to disable struts debug/info messages