I use a legacy library that writes logs using log4j. My default log4j.properties file directs the log to the console, but in some specific functions of my main program, I would
In the version 1.8 of java.util.logging.Logger the correctly form is:
Logger.getLogger("").setLevel(Level.OFF);