Interface LevelConverter

All Known Implementing Classes:
DefaultLevelConverter

public interface LevelConverter
Strategy interface to convert between custom Log4j Levels and JUL Levels.
Since:
2.1
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts a Log4j logging Level to a JDK logging Level.
    toLevel(Level javaLevel)
    Converts a JDK logging Level to a Log4j logging Level.
  • Method Details

    • toLevel

      Level toLevel(Level javaLevel)
      Converts a JDK logging Level to a Log4j logging Level.
      Parameters:
      javaLevel - JDK Level to convert, may be null per the JUL specification.
      Returns:
      converted Level or null if the given level could not be converted.
    • toJavaLevel

      Level toJavaLevel(Level level)
      Converts a Log4j logging Level to a JDK logging Level.
      Parameters:
      level - Log4j Level to convert.
      Returns:
      converted Level or null if the given level could not be converted.