#include <cacheddateformat.h>
◆ anonymous enum
Enumerator |
---|
NO_MILLISECONDS | |
UNRECOGNIZED_MILLISECONDS | |
◆ CachedDateFormat()
log4cxx::pattern::CachedDateFormat::CachedDateFormat |
( |
const log4cxx::helpers::DateFormatPtr & |
dateFormat, |
|
|
int |
expiration |
|
) |
| |
Creates a new CachedDateFormat object.
- Parameters
-
dateFormat | Date format, may not be null. |
expiration | maximum cached range in microseconds. If the dateFormat is known to be incompatible with the caching algorithm, use a value of 0 to totally disable caching or 1 to only use cache for duplicate requests. |
◆ findMillisecondStart()
static int log4cxx::pattern::CachedDateFormat::findMillisecondStart |
( |
log4cxx_time_t |
time, |
|
|
const LogString & |
formatted, |
|
|
const log4cxx::helpers::DateFormatPtr & |
formatter, |
|
|
log4cxx::helpers::Pool & |
pool |
|
) |
| |
|
static |
Finds start of millisecond field in formatted time.
- Parameters
-
time | long time, must be integral number of seconds |
formatted | String corresponding formatted string |
formatter | DateFormat date format |
pool | pool. |
- Returns
- int position in string of first digit of milliseconds, -1 indicates no millisecond field, -2 indicates unrecognized field (likely RelativeTimeDateFormat)
◆ format()
Formats a Date into a date/time string.
- Parameters
-
date | the date to format. |
sbuf | the string buffer to write to. |
p | memory pool. |
Implements log4cxx::helpers::DateFormat.
◆ getMaximumCacheValidity()
static int log4cxx::pattern::CachedDateFormat::getMaximumCacheValidity |
( |
const LogString & |
pattern | ) |
|
|
static |
Gets maximum cache validity for the specified SimpleDateTime conversion pattern.
- Parameters
-
pattern | conversion pattern, may not be null. |
- Returns
- Duration in microseconds from an integral second that the cache will return consistent results.
◆ numberFormat()
Format an integer consistent with the format method.
- Parameters
-
s | string to which the numeric string is appended. |
n | integer value. |
p | memory pool used during formatting. |
Reimplemented from log4cxx::helpers::DateFormat.
◆ setTimeZone()
virtual void log4cxx::pattern::CachedDateFormat::setTimeZone |
( |
const log4cxx::helpers::TimeZonePtr & |
zone | ) |
|
|
virtual |
Set timezone.
- Parameters
-
zone | TimeZone new timezone |
The documentation for this class was generated from the following file: