org.apache.log4j
Class MyPatternParser
java.lang.Object
org.apache.log4j.helpers.PatternParser
org.apache.log4j.MyPatternParser
public class MyPatternParser
- extends PatternParser
Example showing how to extend PatternParser to recognize additional
conversion characters. The examples shows that minimum and maximum
width and alignment settings apply for "extension" conversion
characters just as they do for EnhancedPatternLayout recognized characters.
In this case MyPatternParser recognizes %# and outputs the value
of an internal counter which is also incremented at each call.
See source code
for more details.
- Author:
- Anders Kristensen
- See Also:
MyPatternLayout
,
PatternParser
,
EnhancedPatternLayout
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MyPatternParser
public MyPatternParser(java.lang.String pattern)
finalizeConverter
public void finalizeConverter(char c)
- Overrides:
finalizeConverter
in class PatternParser
Copyright © 2010 The Apache Software Foundation. Licensed under the Apache License, Version 2.0
Apache Extras Companion for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.