Home > Java > Turning off JDK logging

Turning off JDK logging

by paul on September 10, 2011

I’ve been developing a simple little command line application and one of the libraries I’m using seems to log debug information to the console. To clean up the console output, I had to turn off the JDK by using:


        LogManager.getLogManager().reset();

This seemed to do the trick for me, but it sounds like in some cases you may need to go a bit further and turn off logging at the global logger level:


        LogManager.getLogManager().reset();
        Logger globalLogger = Logger.getLogger(java.util.logging.Logger.GLOBAL_LOGGER_NAME);
        globalLogger.setLevel(java.util.logging.Level.OFF);

Comments on this entry are closed.

Previous post:

Next post: