Package org.apache.log4j.pattern
Class NameAbbreviator.PatternAbbreviatorFragment
java.lang.Object
org.apache.log4j.pattern.NameAbbreviator.PatternAbbreviatorFragment
- Enclosing class:
- NameAbbreviator
Fragment of an pattern abbreviator.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPatternAbbreviatorFragment
(int charCount, char ellipsis) Creates a PatternAbbreviatorFragment. -
Method Summary
Modifier and TypeMethodDescriptionint
abbreviate
(StringBuffer buf, int startPos) Abbreviate element of name.
-
Field Details
-
charCount
private final int charCountCount of initial characters of element to output. -
ellipsis
private final char ellipsisCharacter used to represent dropped characters. '\0' indicates no representation of dropped characters.
-
-
Constructor Details
-
PatternAbbreviatorFragment
public PatternAbbreviatorFragment(int charCount, char ellipsis) Creates a PatternAbbreviatorFragment.- Parameters:
charCount
- number of initial characters to preserve.ellipsis
- character to represent elimination of characters, '\0' if no ellipsis is desired.
-
-
Method Details
-
abbreviate
Abbreviate element of name.- Parameters:
buf
- buffer to receive element.startPos
- starting index of name element.- Returns:
- starting index of next element.
-