How to configure java.util.logging to work in karaf

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to configure java.util.logging to work in karaf

Hi all,

on it says that karaf supports a number of logging APIs:

In addition to being a standard OSGi Log service, it supports the following APIs:

•Apache Commons Logging
•Apache Log4j
•Java Util Logging
However, I don't have a clue how to configure my java.util Loggers using the (all log4j-based) logging config at


Can anyone enlighten me? I have tried to simply add java.util.logging config entries into the above-mentioned file like

handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
my.package.level = ALL
but without success. (i.e. these entries seem to be ignored and still everything is logged with the INFO level configured for the root logger)

What I want to achieve is to have everything logged at INFO level (and above) and to only have my.package (and subpackages) logged with maximum verbosity.

Thanks for any help or examples