How to map levels of java.util.logging and SLF4J l

2020-02-23 05:44发布

问题:

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

回答1:

From the SLF4JBridgeHandler docs:

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