org.apache.log4j.examples.appserver
Class AppServerPatternParser
java.lang.Object
|
+--org.apache.log4j.helpers.PatternParser
|
+--org.apache.log4j.examples.appserver.AppServerPatternParser
- public class AppServerPatternParser
- extends PatternParser
Extend PatternParser to recognize additional conversion characters
suitable for use by application servers.
- s - server name
- h - hostname
- b - component name (c and C already in use)
- v - version name
- Author:
- Paul Glezen
- See Also:
MyPatternLayout
,
PatternParser
,
PatternLayout
Method Summary |
void |
finalizeConverter(char formatChar)
Decide, based on the format character, which subtype of
Converter to instanciate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HOSTNAME_CHAR
protected static final char HOSTNAME_CHAR
- Set to 'h'.
SERVER_CHAR
protected static final char SERVER_CHAR
- Set to 's'.
COMPONENT_CHAR
protected static final char COMPONENT_CHAR
- Set to 'b'.
VERSION_CHAR
protected static final char VERSION_CHAR
- Set to 'v'.
AppServerPatternParser
public AppServerPatternParser(String pattern)
- Create a parser with the provided pattern.
- Parameters:
pattern
- a formatting pattern to parse
finalizeConverter
public void finalizeConverter(char formatChar)
- Decide, based on the format character, which subtype of
Converter
to instanciate. The converter is
then added to the converter list using the
addConverter
superclass method.
If the format character is not recognized, it is passed
to the superclass for interpretation.
- Overrides:
finalizeConverter
in class PatternParser
Please notify me about new log4j releases.