How to map levels of java.util.logging and SLF4J logger?

shashantrika picture shashantrika · Dec 27, 2013 · Viewed 14.1k times · Source

How do logging levels from java.util.logging map to SLF4J?

SLF4J

  • trace
  • debug
  • info
  • warn
  • error
  • fatal

java.util.logging

  • finest
  • finer
  • fine
  • config
  • info
  • warning
  • severe

Answer

jmehrens picture jmehrens · Dec 27, 2013

From the SLF4JBridgeHandler docs and testing:

ALL     -> TRACE
FINEST  -> TRACE
FINER   -> DEBUG
FINE    -> DEBUG
CONFIG  -> INFO
INFO    -> INFO
WARNING -> WARN
SEVERE  -> ERROR
OFF     -> ERROR