|
| JSONLayout () |
|
| ~JSONLayout () |
|
void | setLocationInfo (bool locationInfoFlag) |
| The LocationInfo option takes a boolean value.
|
|
bool | getLocationInfo () const |
| Returns the current value of the LocationInfo option.
|
|
void | setPrettyPrint (bool prettyPrintFlag) |
| The PrettyPrint option takes a boolean value.
|
|
bool | getPrettyPrint () const |
| Returns the current value of the PrettyPrint option.
|
|
LogString | getContentType () const override |
| Returns the content type output by this layout, i.e "application/json".
|
|
void | activateOptions (helpers::Pool &) override |
| Activate the options that were previously set with calls to option setters.
|
|
void | setOption (const LogString &option, const LogString &value) override |
| Set options.
|
|
void | format (LogString &output, const spi::LoggingEventPtr &event, helpers::Pool &pool) const override |
| Implement this method to create your own layout format.
|
|
bool | ignoresThrowable () const override |
| The JSON layout handles the throwable contained in logging events.
|
|
virtual | ~Layout () |
|
virtual void | format (LogString &output, const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool) const =0 |
| Implement this method to create your own layout format.
|
|
virtual LogString | getContentType () const |
| Returns the content type output by this layout.
|
|
virtual void | appendHeader (LogString &output, log4cxx::helpers::Pool &p) |
| Append the header for the layout format.
|
|
virtual void | appendFooter (LogString &output, log4cxx::helpers::Pool &p) |
| Append the footer for the layout format.
|
|
virtual bool | ignoresThrowable () const =0 |
| If the layout handles the throwable object contained within LoggingEvent , then the layout should return false .
|
|
Public Member Functions inherited from log4cxx::spi::OptionHandler |
virtual | ~OptionHandler () |
|
virtual void | activateOptions (helpers::Pool &p)=0 |
| Activate the options that were previously set with calls to option setters.
|
|
virtual void | setOption (const LogString &option, const LogString &value)=0 |
| Set option to value .
|
|
virtual | ~Object () |
|
virtual const helpers::Class & | getClass () const =0 |
|
virtual bool | instanceof (const Class &clazz) const =0 |
|
virtual const void * | cast (const Class &clazz) const =0 |
|
This layout outputs events in a JSON dictionary.
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 log4cxx::spi::OptionHandler.