Since 2.4, supports custom JUL levels by mapping them to their closest mapped neighbour.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap | |
| private final Map | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private long | |
| private void | |
| private void | |
| private Level | |
| public Level | toJavaLevel(final Level
Log4j Level to convert. level)Implements org. Converts a Log4j logging Level to a JDK logging Level. |
| public Level | toLevel(final Level
JDK Level to convert, may be null per the JUL specification. javaLevel)Implements org. Converts a JDK logging Level to a Log4j logging Level. |
| julToLog4j | back to summary |
|---|---|
| private final ConcurrentMap<Level, Level> julToLog4j | |
| log4jToJul | back to summary |
|---|---|
| private final Map<Level, Level> log4jToJul | |
| sortedJulLevels | back to summary |
|---|---|
| private final List<Level> sortedJulLevels | |
| DefaultLevelConverter | back to summary |
|---|---|
| public DefaultLevelConverter() | |
| distance | back to summary |
|---|---|
| private long distance(final Level javaLevel, final Level customJavaLevel) | |
| mapJulToLog4j | back to summary |
|---|---|
| private void mapJulToLog4j(final Level julLevel, final Level level) | |
| mapLog4jToJul | back to summary |
|---|---|
| private void mapLog4jToJul(final Level level, final Level julLevel) | |
| nearestLevel | back to summary |
|---|---|
| private Level nearestLevel(final Level customJavaLevel) | |
| toJavaLevel | back to summary |
|---|---|
| public Level toJavaLevel(final Level level) Implements org. Doc from org. Converts a Log4j logging Level to a JDK logging Level. | |
| toLevel | back to summary |
|---|---|
| public Level toLevel(final Level javaLevel) Implements org. Doc from org. Converts a JDK logging Level to a Log4j logging Level. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(final Level
the first object to be compared. level1, final Level the second object to be compared. level2)Implements java. Compares its two arguments for order. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| JulLevelComparator | back to summary |
|---|---|
| pack-priv JulLevelComparator() | |
| compare | back to summary |
|---|---|
| public int compare(final Level level1, final Level level2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |