public final class LiteralPatternConverter extends LogEventPatternConverter implements ArrayPatternConverter
LOGGER
CATEGORY
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() |
boolean |
isVariable() |
String |
toString() |
handlesThrowable
getName, getStyleClass
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getStyleClass
public 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 LogEventPatternConverter
event
- 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 PatternConverter
format
in class LogEventPatternConverter
obj
- 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 ArrayPatternConverter
output
- The StringBuilder to add the content to.objects
- The Object array.public String getLiteral()
public boolean isVariable()
isVariable
in class LogEventPatternConverter
Copyright © 1999-2017. 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.