|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.x4juli.global.components.AbstractComponent
org.x4juli.formatter.pattern.PatternConverter
PatternConverter is an abstract 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 an object in a converter specific manner.
Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by James P. Cakalic, Ceki Gülcü, Chris Nokes, Curt Arnold. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.
| Field Summary | |
private java.lang.String |
name
Converter name. |
private java.lang.String |
style
Converter style name. |
| Fields inherited from class org.x4juli.global.components.AbstractComponent |
manager, repository |
| Constructor Summary | |
protected |
PatternConverter(java.lang.String name,
java.lang.String style)
Create a new pattern converter. |
| Method Summary | |
abstract void |
format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo)
Formats an object into a string buffer. |
MessageProperties |
getMessageProperties()
Specifiy Properties for the component. Default Implementation returns null. |
java.lang.String |
getName()
This method returns the name of the conversion pattern. |
java.lang.String |
getStyleClass(java.lang.Object e)
This method returns the CSS style class that should be applied to the LoggingEvent passed as parameter, which can be null. |
java.lang.String |
toString()
|
| Methods inherited from class org.x4juli.global.components.AbstractComponent |
getLogger, getLoggerRepository, getNonFloodingLogger, getProperty, getProperty, getProperty, getProperty, resetErrorCount, setObjectStore |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private final java.lang.String name
private final java.lang.String style
| Constructor Detail |
protected PatternConverter(java.lang.String name,
java.lang.String style)
name - name for pattern converter.style - CSS style for formatted output.| Method Detail |
public abstract void format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo)
obj - event to format, may not be null.toAppendTo - string buffer to which the formatted event will be
appended. May not be null.public final java.lang.String getName()
public java.lang.String getStyleClass(java.lang.Object e)
e - null values are accepted
public MessageProperties getMessageProperties()
getMessageProperties in interface ComponentgetMessageProperties in class AbstractComponentpublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||