public abstract class AbstractPatternConverter extends Object implements PatternConverter
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.
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER
Allow subclasses access to the status logger.
|
CATEGORY
Modifier | Constructor and Description |
---|---|
protected |
AbstractPatternConverter(String name,
String style)
Create a new pattern converter.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
This method returns the name of the conversion pattern.
|
String |
getStyleClass(Object e)
This method returns the CSS style class that should be applied to the LoggingEvent passed as parameter, which can
be null.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
format
protected static final Logger LOGGER
public final String getName()
The name can be useful to certain Layouts such as HtmlLayout.
getName
in interface PatternConverter
public String getStyleClass(Object e)
This information is currently used only by HtmlLayout.
getStyleClass
in interface PatternConverter
e
- null values are accepted Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.