Wednesday, April 23, 2008

Configure the JDK Logging

If you have code in your application, for example from third party libraries that uses the standard JDK logging, then you should be able to create a logging.properties file and pass it as a system property as in:


java -Djava.util.logging.config.file=logging.properties


Let us take a look at a sample logging.properties.


handlers= java.util.logging.ConsoleHandler.level= INFO
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
org.something.something = FINER
org.apache.tomcat.catalina = FINER

No comments: