How do logging levels from java.util.logging map to SLF4J?
SLF4J
java.util.logging
When using log4j, the Logger. log(Priority p, Object message) method is available and can be used to log a message at a log level determined at runtime. We're using this fact and this tip to redirect stderr to a logger at a specific log level. slf4j doesn't have a generic log() method that I can find.
slf4j. simpleLogger. defaultLogLevel - Default log level for all instances of SimpleLogger. Must be one of ("trace", "debug", "info", "warn", "error" or "off").
Description. java.util.logging. Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities. javax.sql.rowset.spi. The standard classes and interfaces that a third party vendor has to use in its implementation of a synchronization provider.
From the SLF4JBridgeHandler docs and testing (annotated with brackets):
[ALL -> TRACE] FINEST -> TRACE FINER -> DEBUG FINE -> DEBUG [CONFIG -> INFO] INFO -> INFO WARNING -> WARN SEVERE -> ERROR [OFF -> ERROR]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With