18 #ifndef _LOG4CXX_JSON_LAYOUT_H
19 #define _LOG4CXX_JSON_LAYOUT_H
26 #pragma warning ( push )
27 #pragma warning ( disable: 4251 )
74 inline
void setLocationInfo(
bool locationInfoFlag)
76 this->locationInfo = locationInfoFlag;
97 this->prettyPrint = prettyPrintFlag;
114 return LOG4CXX_STR(
"application/json");
142 #if defined(_MSC_VER)
143 #pragma warning (pop)
This layout outputs events in a JSON dictionary.
Definition: jsonlayout.h:37
void appendQuotedEscapedString(LogString &buf, const LogString &input) const
bool getPrettyPrint() const
Returns the current value of the PrettyPrint option.
Definition: jsonlayout.h:103
virtual void format(LogString &output, const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool) const
Implement this method to create your own layout format.
void setPrettyPrint(bool prettyPrintFlag)
The PrettyPrint option takes a boolean value.
Definition: jsonlayout.h:95
void appendSerializedMDC(LogString &buf, const spi::LoggingEventPtr &event) const
bool getLocationInfo() const
Returns the current value of the LocationInfo option.
Definition: jsonlayout.h:83
virtual void activateOptions(log4cxx::helpers::Pool &)
No options to activate.
Definition: jsonlayout.h:120
virtual LogString getContentType() const
Returns the content type output by this layout, i.e "application/json".
Definition: jsonlayout.h:112
LogString ppIndentL1
Definition: jsonlayout.h:47
void appendSerializedNDC(LogString &buf, const spi::LoggingEventPtr &event) const
LogString ppIndentL2
Definition: jsonlayout.h:48
virtual void setOption(const LogString &option, const LogString &value)
Set options.
virtual bool ignoresThrowable() const
The JSON layout handles the throwable contained in logging events.
Definition: jsonlayout.h:133
void appendSerializedLocationInfo(LogString &buf, const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) const
Extend this abstract class to create your own log layout format.
Definition: layout.h:40
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:37
Definition: appender.h:33
std::basic_string< logchar > LogString
Definition: logstring.h:66
LOG4CXX_PTR_DEF(Appender)
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:148
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:142
#define DECLARE_LOG4CXX_OBJECT(object)
Definition: object.h:39
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition: object.h:154
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:136