java.util.logging: how to suppress date line

From Java SE 7 there is a new system property: java.util.logging.SimpleFormatter.format.

The same property is also configurable on the java.util.logging properties file (logging.properties).
If you are an Eclipse user, and you are annoyed by the double line message in the console output, you could change the jre logging.properties file (JDK_HOME/jre/lib/logging.properties) in this way:

java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n

Some example format is available here: http://docs.oracle.com/javase/7/docs/api/index.html?java/util/logging/SimpleFormatter.html.

Leave a Comment