How do you stop Java driver logging?

To suppress MongoDB Java Driver logging, I tried this and works fine:

Logger logger = Logger.getLogger("org.mongodb.driver");
logger.setLevel(Level.SEVERE);

I used Level.SEVERE instead of OFF, so that the severe errors can be logged and noted, ignoring all the other informational and warning messages. Depending upon your need you can also use other levels like Level.WARN, for example.

I think it is not a good idea to turn off logging altogether - some level of logging needs to be retained to capture those errors and warnings.