Class NameAbbreviator.MaxElementAbbreviator
- java.lang.Object
-
- org.apache.logging.log4j.core.pattern.NameAbbreviator
-
- org.apache.logging.log4j.core.pattern.NameAbbreviator.MaxElementAbbreviator
-
- Enclosing class:
- NameAbbreviator
private static class NameAbbreviator.MaxElementAbbreviator extends NameAbbreviator
Abbreviator that drops starting path elements.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
NameAbbreviator.MaxElementAbbreviator.Strategy
When the name is reduced in length by cutting parts, there can be two ways to do it.
-
Field Summary
Fields Modifier and Type Field Description private int
count
Maximum number of path elements to output.private NameAbbreviator.MaxElementAbbreviator.Strategy
strategy
Strategy used for cutting down the size of the name
-
Constructor Summary
Constructors Constructor Description MaxElementAbbreviator(int count, NameAbbreviator.MaxElementAbbreviator.Strategy strategy)
Create new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abbreviate(java.lang.String original, java.lang.StringBuilder destination)
Abbreviate name.-
Methods inherited from class org.apache.logging.log4j.core.pattern.NameAbbreviator
getAbbreviator, getDefaultAbbreviator
-
-
-
-
Field Detail
-
count
private final int count
Maximum number of path elements to output.
-
strategy
private final NameAbbreviator.MaxElementAbbreviator.Strategy strategy
Strategy used for cutting down the size of the name
-
-
Constructor Detail
-
MaxElementAbbreviator
public MaxElementAbbreviator(int count, NameAbbreviator.MaxElementAbbreviator.Strategy strategy)
Create new instance.- Parameters:
count
- maximum number of path elements to drop or output.strategy
- drop or retain
-
-
Method Detail
-
abbreviate
public void abbreviate(java.lang.String original, java.lang.StringBuilder destination)
Abbreviate name.- Specified by:
abbreviate
in classNameAbbreviator
- Parameters:
original
- The String to abbreviate.destination
- the buffer to write the abbreviated name into
-
-