• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring Data Mongodb MongoDbUtils disable DEBUG Logging

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic