• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Spring Data Mongodb MongoDbUtils disable DEBUG Logging

Posts: 2
  • 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.
Posts: 2759
Eclipse IDE Spring Tomcat Server
  • 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.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!