
On 24/04/14 07:17, Gerd Petermann wrote:
Hi programmers,
I know that I can modify the source to do that, but I'd prefer to have an option in the logging.properties. It makes life much easier when comparing the contents of two log files.
As of java 7 it is possible to specify a log format string with SimpleFormatter. You couldn't do that with Java 1.5 which is why I wrote UsefulFormatter. So you can change UsefulFormatter lines to: java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter java.util.logging.FileHandler.formatter=uk.me.parabola.log.UsefulFormatter and then provide a format string: java.util.logging.SimpleFormatter.format=%4$s: %5$s%n See http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax for the full list of formatting options. ..Steve