Hide mongodb logging

  • What version of the driver did you upgrade from?

I actually had the mongo-java-driver: 3.12.4 installed. But now when i revert the changes it still prints the logging. Must be java then since i updated that also when i updated the drivers. But i used this to hide the logging Here

  • Are you trying to disable all SLF4J-based logging, or just logging from the driver?

Since i’m using the Listeners to log the connections i don’t really want the drive to print in the console that it connects to the server. So yes just the driver. I tried to use slf4j before but whatever i did, nothing happend.

 .applyToServerSettings(builder -> {
      builder.addServerMonitorListener(new MongoListener(this));
 });

But i do wish there was like an option to just add a line and the drive wont print anything in the console

MongoClientSettings.Builder options = MongoClientSettings.builder()
.disableLogging(true); //someting like this

I hope you understand what i mean :slight_smile: