Class SimpleLiteralPatternConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.pattern.AbstractPatternConverter
-
- org.apache.logging.log4j.core.pattern.LogEventPatternConverter
-
- org.apache.logging.log4j.core.pattern.SimpleLiteralPatternConverter
-
- All Implemented Interfaces:
ArrayPatternConverter,PatternConverter
- Direct Known Subclasses:
SimpleLiteralPatternConverter.Noop,SimpleLiteralPatternConverter.Space,SimpleLiteralPatternConverter.StringValue
abstract class SimpleLiteralPatternConverter extends LogEventPatternConverter implements ArrayPatternConverter
Formats a string literal without substitution. This is an effectively-sealed internal type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSimpleLiteralPatternConverter.Noopprivate static classSimpleLiteralPatternConverter.Spaceprivate static classSimpleLiteralPatternConverter.StringValue
-
Field Summary
-
Fields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
LOGGER
-
Fields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter
CATEGORY
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSimpleLiteralPatternConverter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidformat(java.lang.Object ignored, java.lang.StringBuilder output)Formats an object into a string buffer.(package private) abstract voidformat(java.lang.StringBuilder output)voidformat(java.lang.StringBuilder output, java.lang.Object... args)Formats an array of Objects.voidformat(LogEvent ignored, java.lang.StringBuilder output)Formats an event into a string buffer.booleanhandlesThrowable()Tests whether this pattern converter is renders aThrowable.booleanisVariable()(package private) static LogEventPatternConverterof(java.lang.String literal)(package private) static LogEventPatternConverterof(java.lang.String literal, boolean convertBackslashes)-
Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
emptyVariableOutput
-
Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
getName, getStyleClass
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter
getName, getStyleClass
-
-
-
-
Method Detail
-
of
static LogEventPatternConverter of(java.lang.String literal, boolean convertBackslashes)
-
of
static LogEventPatternConverter of(java.lang.String literal)
-
format
public final void format(LogEvent ignored, java.lang.StringBuilder output)
Formats an event into a string buffer.- Specified by:
formatin classLogEventPatternConverter- Parameters:
ignored- event to format, may not be null.output- string buffer to which the formatted event will be appended. May not be null.
-
format
public final void format(java.lang.Object ignored, java.lang.StringBuilder output)Formats an object into a string buffer.- Specified by:
formatin interfacePatternConverter- Overrides:
formatin classLogEventPatternConverter- Parameters:
ignored- event to format, may not be null.output- string buffer to which the formatted event will be appended. May not be null.
-
format
public final void format(java.lang.StringBuilder output, java.lang.Object... args)Formats an array of Objects.- Specified by:
formatin interfaceArrayPatternConverter- Parameters:
output- The StringBuilder to add the content to.args- The Object array.
-
format
abstract void format(java.lang.StringBuilder output)
-
isVariable
public final boolean isVariable()
- Overrides:
isVariablein classLogEventPatternConverter
-
handlesThrowable
public final boolean handlesThrowable()
Description copied from class:LogEventPatternConverterTests whether this pattern converter is renders aThrowable.The
PatternParserchecks this flag when processing thealwaysWriteExceptionsoption: if no converter in the pattern handles throwables, the parser automatically appends a converter to ensure exceptions are still written.- Overrides:
handlesThrowablein classLogEventPatternConverter- Returns:
trueif this converter consumes and renders aThrowable,falseotherwise
-
-