18#ifndef _LOG4CXX_HELPERS_DATE_LAYOUT_H
19#define _LOG4CXX_HELPERS_DATE_LAYOUT_H
26 #pragma warning ( push )
27 #pragma warning ( disable: 4251 )
62 this->dateFormatOption.assign(dateFormat1);
70 return dateFormatOption;
79 this->timeZoneID.assign(timeZone);
105 #pragma warning (pop)
Extend this abstract class to create your own log layout format.
Definition: layout.h:40
This abstract layout takes care of all the date related options and formatting work.
Definition: datelayout.h:39
const LogString & getDateFormat() const
Returns value of the DateFormat option.
Definition: datelayout.h:68
DateLayout(const LogString &dateLayoutOption)
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::DateFo...
Definition: datelayout.h:60
void setTimeZone(const LogString &timeZone)
The TimeZoneID option is a time zone ID string in the format expected by the locale C++ standard clas...
Definition: datelayout.h:77
const LogString & getTimeZone() const
Returns value of the TimeZone option.
Definition: datelayout.h:85
void formatDate(LogString &s, const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) const
DateFormatPtr dateFormat
Definition: datelayout.h:45
virtual void activateOptions(log4cxx::helpers::Pool &p)
Activate the options that were previously set with calls to option setters.
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:38
Definition: messagehandler.h:23
std::basic_string< logchar > LogString
Definition: logstring.h:66