@Plugin(name="DatePatternConverter", category="Converter") public final class DatePatternConverter extends LogEventPatternConverter implements ArrayPatternConverter
LOGGER
CATEGORY
Modifier and Type | Method and Description |
---|---|
void |
format(Date date,
StringBuilder toAppendTo)
Appends formatted date to string buffer.
|
void |
format(Instant instant,
StringBuilder output) |
void |
format(LogEvent event,
StringBuilder output)
Formats an event into a string buffer.
|
void |
format(long epochMilli,
StringBuilder output) |
void |
format(Object obj,
StringBuilder output)
Formats an object into a string buffer.
|
void |
format(StringBuilder toAppendTo,
Object... objects)
Formats an array of Objects.
|
String |
getPattern()
Gets the pattern string describing this date format.
|
static DatePatternConverter |
newInstance(String[] options)
Obtains an instance of pattern converter.
|
handlesThrowable, isVariable
getName, getStyleClass
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getStyleClass
public static DatePatternConverter newInstance(String[] options)
options
- options, may be null.public void format(Date date, StringBuilder toAppendTo)
date
- datetoAppendTo
- buffer to which formatted date is appended.public void format(LogEvent event, StringBuilder output)
format
in class LogEventPatternConverter
event
- 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(long epochMilli, StringBuilder output)
public void format(Instant instant, StringBuilder output)
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 toAppendTo, Object... objects)
ArrayPatternConverter
format
in interface ArrayPatternConverter
toAppendTo
- The StringBuilder to add the content to.objects
- The Object array.public String getPattern()
Copyright © 1999-2021 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.