My app uses many libraries and I'm using java.util.logging
for logging. I'd like to be able to set different logging levels for each library by doing something like:
org.datanucleus.*.level = WARNING
com.google.apphosting.*.level = WARNING
com.myapp.*.level = FINE
Is is possible?
You shouldn't use "*". A sample logging.properties could be such as:
handlers=java.util.logging.ConsoleHandler
.level=ALL
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
org.datanucleus.level=WARNING
org.datanucleus.handler=java.util.logging.ConsoleHandler
com.myapp.level=FINE
com.myapp.handler=java.util.logging.ConsoleHandler
And if all "org" level should be logged as WARNING then
org.level=WARNING
org.handler=java.util.logging.ConsoleHandler