views:

152

answers:

1

I am using java.util.logging in an EJB application running on glassfish v3. I can see the log messages in server.log but i don't seem to be able to configure the logging level in glassfish\domains\domain1\config\logging.properties. If I use:

Logger logger = Logger.getLogger("com.foo");

To obtain the logger and log with:

logger.info("message");

then I expect that if I set

com.foo.level=WARNING 

in logging.properties then the message should not logged. Am I doing something wrong here?

A: 

If you use .level=WARNING, only WARNING and above severities will be logged. You will have to set it to FINEST, FINER, FINE, CONFIG or INFO to have logger.info(anything) actually do something.

Romain