0

I have created my own formatter, extending java.util.logging.Formatter.

My logging.properties looks like:

handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter=path.to.my.MyFormatter

However, whenever I run it, MyFormatter is never constructed, and never invoked.

Running it with the -verbose option I have verified that path.to.my.MyFormatter is loaded shortly after java.util.logging.ConsoleHandler is loaded, so I don't think it is a class path problem.

If it is relevant (I hope not) I am running on a RedHat6.4 server with openjdk-1.6.0.

W

Raedwald
  • 46,613
  • 43
  • 151
  • 237
user2437173
  • 121
  • 1
  • 6
  • See if this helps - http://stackoverflow.com/questions/16030578/subclassing-java-util-logging-formatter-doesnt-work – user93353 May 30 '13 at 15:58
  • The simpleDateFormat string I entered was invalid. Because it was defined inline for a final, it never got to my debug message in the constructor, and java.util.logging silently ignored the exception. – user2437173 May 30 '13 at 16:02

0 Answers0