logo separator

[mkgmap-dev] Is it possible to configure logger to print no timestamp?

From Steve Ratcliffe steve at parabola.me.uk on Thu Apr 24 09:01:38 BST 2014

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


More information about the mkgmap-dev mailing list