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 Level
Custom Log4j level corresponding to theLevel.CONFIG
logging level.static final Level
Custom Log4j level corresponding to theLevel.FINEST
logging level.private static final LevelConverter
private static final Logger
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
FINEST
Custom Log4j level corresponding to theLevel.FINEST
logging level. This maps to a level more specific thanLevel.TRACE
. -
CONFIG
Custom Log4j level corresponding to theLevel.CONFIG
logging level. This maps to a level in betweenLevel.INFO
andLevel.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.
-