Line | |
---|
1 | package fr.mael.jiwigo.transverse.util.log4j; |
---|
2 | |
---|
3 | import org.apache.log4j.helpers.FormattingInfo; |
---|
4 | import org.apache.log4j.spi.LoggingEvent; |
---|
5 | |
---|
6 | /** |
---|
7 | * @author mael |
---|
8 | * |
---|
9 | */ |
---|
10 | public class ClassNameConcisePatternConverter extends AbstractConcisePatternConverter { |
---|
11 | |
---|
12 | /** |
---|
13 | * |
---|
14 | */ |
---|
15 | private static final int CLASS_LENGTH = 30; |
---|
16 | |
---|
17 | /** |
---|
18 | * Constructeur de ClassNameConcisePatternConverter. |
---|
19 | * @param formattingInfo . |
---|
20 | * @param precision . |
---|
21 | */ |
---|
22 | public ClassNameConcisePatternConverter(final FormattingInfo formattingInfo, final int precision) { |
---|
23 | super(formattingInfo, precision); |
---|
24 | } |
---|
25 | |
---|
26 | /**. |
---|
27 | * {@inheritDoc} |
---|
28 | */ |
---|
29 | protected final String getConciseName(final LoggingEvent event) { |
---|
30 | return simplify(event.getLocationInformation().getClassName(), CLASS_LENGTH); |
---|
31 | } |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.