ArrayPatternConverter, PatternConverterpublic final class LiteralPatternConverter extends LogEventPatternConverter implements ArrayPatternConverter
LOGGERCATEGORY| Constructor | Description |
|---|---|
LiteralPatternConverter(Configuration config,
String literal,
boolean convertBackslashes) |
Create a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
format(Object obj,
StringBuilder output) |
Formats an object into a string buffer.
|
void |
format(StringBuilder output,
Object... objects) |
Formats an array of Objects.
|
void |
format(LogEvent event,
StringBuilder toAppendTo) |
Formats an event into a string buffer.
|
String |
getLiteral() |
|
boolean |
isVariable() |
|
String |
toString() |
getName, getStyleClasshandlesThrowableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getStyleClasspublic LiteralPatternConverter(Configuration config, String literal, boolean convertBackslashes)
config - The Configuration.literal - string literal.convertBackslashes - if true, backslash characters are treated as escape characters and character
sequences like "\" followed by "t" (backslash+t) are converted to special characters like '\t' (tab).public void format(LogEvent event, StringBuilder toAppendTo)
format in class LogEventPatternConverterevent - event to format, may not be null.toAppendTo - string buffer to which the formatted event will be appended. May not be null.public void format(Object obj, StringBuilder output)
format in interface PatternConverterformat in class LogEventPatternConverterobj - event to format, may not be null.output - string buffer to which the formatted event will be appended. May not be null.public void format(StringBuilder output, Object... objects)
format in interface ArrayPatternConverteroutput - The StringBuilder to add the content to.objects - The Object array.public String getLiteral()
public boolean isVariable()
isVariable in class LogEventPatternConverterCopyright © 1999-2018. 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.