public final class DatePatternConverter extends LoggingEventPatternConverter
Modifier and Type | Class and Description |
---|---|
private static class |
DatePatternConverter.DefaultZoneDateFormat
This class wraps a DateFormat and forces the time zone to the
default time zone before each format and parse request.
|
Modifier and Type | Field and Description |
---|---|
private static String |
ABSOLUTE_FORMAT
ABSOLUTE string literal.
|
private static String |
ABSOLUTE_TIME_PATTERN
SimpleTimePattern for ABSOLUTE.
|
private static String |
DATE_AND_TIME_FORMAT
DATE string literal.
|
private static String |
DATE_AND_TIME_PATTERN
SimpleTimePattern for DATE.
|
private CachedDateFormat |
df
Date format.
|
private static String |
ISO8601_FORMAT
ISO8601 string literal.
|
private static String |
ISO8601_PATTERN
SimpleTimePattern for ISO8601.
|
Modifier | Constructor and Description |
---|---|
private |
DatePatternConverter(String[] options)
Private constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
format(Date date,
StringBuffer toAppendTo)
Append formatted date to string buffer.
|
void |
format(LoggingEvent event,
StringBuffer output)
Formats an event into a string buffer.
|
void |
format(Object obj,
StringBuffer output)
Formats an object into a string buffer.
|
static DatePatternConverter |
newInstance(String[] options)
Obtains an instance of pattern converter.
|
handlesThrowable
getName, getStyleClass
private static final String ABSOLUTE_FORMAT
private static final String ABSOLUTE_TIME_PATTERN
private static final String DATE_AND_TIME_FORMAT
private static final String DATE_AND_TIME_PATTERN
private static final String ISO8601_FORMAT
private static final String ISO8601_PATTERN
private final CachedDateFormat df
private DatePatternConverter(String[] options)
options
- options, may be null.public static DatePatternConverter newInstance(String[] options)
options
- options, may be null.public void format(LoggingEvent event, StringBuffer output)
format
in class LoggingEventPatternConverter
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(Object obj, StringBuffer output)
format
in class LoggingEventPatternConverter
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(Date date, StringBuffer toAppendTo)
date
- datetoAppendTo
- buffer to which formatted date is appended.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses