public class DefaultLevelConverter extends Object implements LevelConverter
Since 2.4, supports custom JUL levels by mapping them to their closest mapped neighbour.
| Constructor and Description |
|---|
DefaultLevelConverter() |
| Modifier and Type | Method and Description |
|---|---|
Level |
toJavaLevel(org.apache.logging.log4j.Level level)
Converts a Log4j logging Level to a JDK logging Level.
|
org.apache.logging.log4j.Level |
toLevel(Level javaLevel)
Converts a JDK logging Level to a Log4j logging Level.
|
public DefaultLevelConverter()
public Level toJavaLevel(org.apache.logging.log4j.Level level)
LevelConvertertoJavaLevel in interface LevelConverterlevel - Log4j Level to convert.null if the given level could not be converted.public org.apache.logging.log4j.Level toLevel(Level javaLevel)
LevelConvertertoLevel in interface LevelConverterjavaLevel - JDK Level to convert, may be null per the JUL specification.null if the given level could not be converted.Copyright © 1999-1969 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.