- Main Page
- Modules
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# DateLayout Class Reference

Inherits Layout.

Inherited by TTCCLayout.

List of all members.

## Detailed Description

This abstract layout takes care of all the date related options and formatting work.

## Public Member Functions
| DateLayout (const LogString &dateLayoutOption)
virtual | ~DateLayout ()
virtual void | activateOptions (log4cxx::helpers::Pool &p)
| Activate the options that were previously set with calls to option setters.
virtual void | setOption (const LogString &option, const LogString &value)
| Set `option` to `value`.
void | setDateFormat (const LogString &dateFormat1)
| The value of the DateFormat option should be either an argument to the constructor of helpers::DateFormat or one of the strings "NULL", "RELATIVE", "ABSOLUTE", "DATE" or "ISO8601.
const LogString & | getDateFormat () const
| Returns value of the DateFormat option.
void | setTimeZone (const LogString &timeZone)
| The TimeZoneID option is a time zone ID string in the format expected by the `locale` C++ standard class.
const LogString & | getTimeZone () const
| Returns value of the TimeZone option.
void | formatDate (LogString &s, const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) const
## Protected Attributes
DateFormatPtr | dateFormat

## Constructor & Destructor Documentation

DateLayout | ( | const LogString & | dateLayoutOption | ) |

virtual ~DateLayout | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual void activateOptions | ( | log4cxx::helpers::Pool & | p | ) | `[virtual]`

| Activate the options that were previously set with calls to option setters. This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set. For example, the FileAppender has the File and Append options both of which are ambigous until the other is also set. Implements OptionHandler.

void formatDate | ( | LogString & | s,
|  | const spi::LoggingEventPtr & | event,
|  | log4cxx::helpers::Pool & | p
| ) | const

const LogString& getDateFormat | ( |  | ) | const`[inline]`

| Returns value of the DateFormat option.

const LogString& getTimeZone | ( |  | ) | const`[inline]`

| Returns value of the TimeZone option.

void setDateFormat | ( | const LogString & | dateFormat1 | ) | `[inline]`

| The value of the DateFormat option should be either an argument to the constructor of helpers::DateFormat or one of the strings "NULL", "RELATIVE", "ABSOLUTE", "DATE" or "ISO8601.

virtual void setOption | ( | const LogString & | option,
|  | const LogString & | value
| ) | `[virtual]`

| Set `option` to `value`. The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called. Implements OptionHandler.

void setTimeZone | ( | const LogString & | timeZone | ) | `[inline]`

| The TimeZoneID option is a time zone ID string in the format expected by the `locale` C++ standard class.

## Member Data Documentation

DateFormatPtr dateFormat`[protected]`

The documentation for this class was generated from the following file:

- datelayout.h