|
Log4j 1.3alpha-1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.pattern.PatternConverter
PatternConverter is an abtract class that provides the formatting functionality that derived classes need.
Conversion specifiers in a conversion patterns are parsed to individual PatternConverters. Each of which is responsible for converting a logging event in a converter specific manner.
Field Summary | |
PatternConverter |
next
|
Constructor Summary | |
protected |
PatternConverter()
|
protected |
PatternConverter(FormattingInfo fi)
|
Method Summary | |
static boolean |
chainHandlesThrowable(PatternConverter head)
This method computes whether a chain of converters handles exceptions or not. |
protected abstract java.lang.StringBuffer |
convert(LoggingEvent event)
Derived pattern converters must override this method in order to convert conversion specifiers in the correct way. |
void |
format(java.io.Writer output,
LoggingEvent e)
A template method for formatting in a converter specific way. |
abstract java.lang.String |
getName()
This method returns the name of the conversion pattern. |
java.lang.String |
getOption()
|
abstract java.lang.String |
getStyleClass(LoggingEvent e)
This method returns the CSS style class that should be applied to the LoggingEvent passed as parameter, which can be null. |
boolean |
handlesThrowable()
Normally pattern converters are now meant to handle Exceptions although few pattern converters might. |
void |
setFormattingInfo(FormattingInfo fi)
|
void |
setOption(java.lang.String string)
|
void |
spacePad(java.io.Writer output,
int length)
Fast space padding method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public PatternConverter next
Constructor Detail |
protected PatternConverter()
protected PatternConverter(FormattingInfo fi)
Method Detail |
public void setFormattingInfo(FormattingInfo fi)
protected abstract java.lang.StringBuffer convert(LoggingEvent event)
public void format(java.io.Writer output, LoggingEvent e) throws java.io.IOException
java.io.IOException
public void spacePad(java.io.Writer output, int length) throws java.io.IOException
java.io.IOException
public java.lang.String getOption()
public void setOption(java.lang.String string)
public abstract java.lang.String getName()
public abstract java.lang.String getStyleClass(LoggingEvent e)
e
- null values are accepted
public boolean handlesThrowable()
public static boolean chainHandlesThrowable(PatternConverter head)
head
- The first element of the chain
|
Log4j 1.3alpha-1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |