How to disable JUL in 3rd party jar?
In 3rd party jar logger exist this code. 'Logger.getLogger("net.java.ao").log(Level.INFO, sql.toString());开发者_开发问答'
How can I disable this logger from my program?You could try to raise the LogLevel for the given logger-name "net.java.ao". Therefore, try to specify a custom Logger-configuration using the Java System-Property: "java.util.logging.config.file".
In the file you specified using the above system property, you can simply add the following line:
net.java.ao.level = OFF
Alternatively, you can also use the System-property: "java.util.logging.config.class", as described in the API docs: http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/api/java/util/logging/LogManager.html.
精彩评论