Package org.apache.logging.log4j.jul
Class LevelTranslator
java.lang.Object
org.apache.logging.log4j.jul.LevelTranslator
Utility class to convert between JDK Levels and Log4j 2 Levels.
- Since:
- 2.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LevelCustom Log4j level corresponding to theLevel.CONFIGlogging level.static final LevelCustom Log4j level corresponding to theLevel.FINESTlogging level.private static final LevelConverterprivate static final Logger -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
FINEST
Custom Log4j level corresponding to theLevel.FINESTlogging level. This maps to a level more specific thanLevel.TRACE. -
CONFIG
Custom Log4j level corresponding to theLevel.CONFIGlogging level. This maps to a level in betweenLevel.INFOandLevel.DEBUG. -
LOGGER
-
LEVEL_CONVERTER
-
-
Constructor Details
-
LevelTranslator
private LevelTranslator()
-
-
Method Details
-
toLevel
Converts a JDK logging Level to a Log4j logging Level.- Parameters:
level- JDK Level to convert, may be null per the JUL specification.- Returns:
- converted Level or null
-
toJavaLevel
Converts a Log4j logging Level to a JDK logging Level.- Parameters:
level- Log4j Level to convert.- Returns:
- converted Level.
-