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