title

fire chief's random developer tidbits
Showing posts with label java logging log4j rules. Show all posts
Showing posts with label java logging log4j rules. Show all posts

Tuesday, October 4, 2011

java.util.logging is a joke

pointing the logging system to a properties file works with -Djava.util.logging.config.file=logging.properties
HOWEVER
if you have this contents for example:

handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

it will give the error:
"Can't set level for java.util.logging.ConsoleHandler"

This is simply because there is a SPACE after "level=FINE ".  Really!?  That's terrible.  Back to log4j or maybe logback.