org.apache.log4j.pattern
Class PropertiesPatternConverter
java.lang.Object
|
+--org.apache.log4j.pattern.PatternConverter
|
+--org.apache.log4j.pattern.PropertiesPatternConverter
- public class PropertiesPatternConverter
- extends PatternConverter
Able to handle the contents of the LoggingEvent's Property bundle and either
output the entire contents of the properties in a similar format to the
java.util.Hashtable.toString(), or to output the value of a specific key
within the property bundle
when this pattern converter has the option set.
- Since:
- 1.3
- Author:
- Paul Smith, Ceki Gülcü
Method Summary |
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.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertiesPatternConverter
public PropertiesPatternConverter()
convert
public 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
Copyright 2000-2003 Apache Software Foundation.