org.apache.log4j.pattern
Class ThrowableInformationPatternConverter
java.lang.Object
|
+--org.apache.log4j.pattern.PatternConverter
|
+--org.apache.log4j.pattern.ThrowableInformationPatternConverter
- public class ThrowableInformationPatternConverter
- extends PatternConverter
Outputs the ThrowableInformation portion of the LoggingiEvent as a full stacktrace
unless this converter's option is 'short', where it just outputs the first line of the trace.
- Since:
- 1.3
- Author:
- Paul Smith
Method Summary |
protected java.lang.StringBuffer |
convert(LoggingEvent event)
Derived pattern converters must override this method in order to
convert conversion specifiers in the correct way.
|
java.lang.String |
getName()
This method returns the name of the conversion pattern.
|
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()
This converter obviosly handles throwables. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThrowableInformationPatternConverter
public ThrowableInformationPatternConverter()
convert
protected java.lang.StringBuffer convert(LoggingEvent event)
- Description copied from class:
PatternConverter
- Derived pattern converters must override this method in order to
convert conversion specifiers in the correct way.
IMPORTANT: Note that an implementing class may always return the same
StringBuffer instance in order to avoid superflous object creation.
- Specified by:
convert
in class PatternConverter
getName
public java.lang.String getName()
- Description copied from class:
PatternConverter
- This method returns the name of the conversion pattern.
The name can be useful to certain Layouts such as HTMLLayout.
- Specified by:
getName
in class PatternConverter
- Returns:
- the name of the conversion pattern
getStyleClass
public java.lang.String getStyleClass(LoggingEvent e)
- Description copied from class:
PatternConverter
- This method returns the CSS style class that should be applied to
the LoggingEvent passed as parameter, which can be null.
This information is currently used only by HTMLLayout.
- Specified by:
getStyleClass
in class PatternConverter
- Parameters:
e
- null values are accepted
- Returns:
- the name of the conversion pattern
handlesThrowable
public boolean handlesThrowable()
- This converter obviosly handles throwables.
- Overrides:
handlesThrowable
in class PatternConverter
- Returns:
- true if this PatternConverter handles throwables
Copyright 2000-2003 Apache Software Foundation.