Top Description Methods
org.apache.logging.log4j.jul

public Interface LevelConverter

Known Direct Implementers
org.apache.logging.log4j.jul.DefaultLevelConverter
Imports
org.apache.logging.log4j.Level

Strategy interface to convert between custom Log4j Levels and JUL Levels.
Since
2.1
See Also
Constants#LEVEL_CONVERTER_PROPERTY

Method Summary

Modifier and TypeMethod and Description
public Level

Returns:

converted Level or null if the given level could not be converted.
toJavaLevel
(Level
Log4j Level to convert.
level
)

Converts a Log4j logging Level to a JDK logging Level.

public Level

Returns:

converted Level or null if the given level could not be converted.
toLevel
(Level
JDK Level to convert, may be null per the JUL specification.
javaLevel
)

Converts a JDK logging Level to a Log4j logging Level.

Method Detail

toJavaLevelback to summary
public Level toJavaLevel(Level level)

Converts a Log4j logging Level to a JDK logging Level.

Parameters
level:Level

Log4j Level to convert.

Returns:Level

converted Level or null if the given level could not be converted.

toLevelback to summary
public Level toLevel(Level javaLevel)

Converts a JDK logging Level to a Log4j logging Level.

Parameters
javaLevel:Level

JDK Level to convert, may be null per the JUL specification.

Returns:Level

converted Level or null if the given level could not be converted.