EK.
EK.

Reputation: 2996

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?

Upvotes: 3

Views: 789

Answers (1)

Javaguru
Javaguru

Reputation: 910

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.

Upvotes: 3

Related Questions