public final class LiteralPatternConverter extends LogEventPatternConverter implements ArrayPatternConverter
LOGGERCATEGORY| Constructor and Description |
|---|
LiteralPatternConverter(Configuration config,
String literal,
boolean convertBackslashes)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
format(LogEvent event,
StringBuilder toAppendTo)
Formats an event into a string buffer.
|
void |
format(Object obj,
StringBuilder output)
Formats an object into a string buffer.
|
void |
format(StringBuilder output,
Object... objects)
Formats an array of Objects.
|
String |
getLiteral() |
handlesThrowablegetName, getStyleClassclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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()
Copyright © 1999-2021 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.