I am using java.util.logging.Logger and I want to enable all log levels. I thought the following would work:
logger.setLevel(Level.ALL);
But apparently it doesn’t. Only INFO level logging statements are taking effect, and others are being swallowed.
How do I enable all log levels?
It’s probably the log handler that is swallowing the log records. You need to set the log level on your handlers too. For example:
Or you can read your configuration from a
logging.propertiesfile (just put it in your CLASSPATH root), or you can read alogging.properties-style configuration from a stream usingLogManager.getLogManager().readConfiguration(someInputStream).