Apprenders and formating a default java.util.logger

handlers=java.util.logging.ConsoleHandler
.level=INFO
java.util.logging.FileHandler.level = INFO
java.util.logging.FileHandler.pattern = log.%u.%g.txt
java.util.logging.SimpleFormatter.format= %1$tl:%1$tM:%1$tS %1$Tp %2$s %4$s: %5$s%n
java.util.logging.ConsoleHandler.level=INFO
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter

More info about SimpleFormatter: https://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html#SimpleFormatter()

More Info about formatting params:
https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html

Leave a Reply