|
Apache Log4cxx
Version 2.0.0
|
Extend this abstract class to create your own log layout format. More...
#include <layout.h>
Public Member Functions | |
| virtual | ~Layout () |
| virtual void | format (LogString &output, const spi::LoggingEventPtr &event) const =0 |
| Implement this method to create your own layout format. | |
| void | format (LogString &output, const spi::LoggingEventPtr &event, helpers::Pool &p) const |
| virtual LogString | getContentType () const |
| Returns the content type output by this layout. | |
| virtual void | appendHeader (LogString &output) |
| Append the header for the layout format. | |
| void | appendHeader (LogString &output, helpers::Pool &p) |
| virtual void | appendFooter (LogString &output) |
| Append the footer for the layout format. | |
| void | appendFooter (LogString &output, helpers::Pool &p) |
| virtual bool | ignoresThrowable () const =0 |
If the layout handles the throwable object contained within LoggingEvent, then the layout should return false. | |
| void | activateOptions () override |
| Activate the options that were previously set with calls to option setters. | |
| void | activateOptions (helpers::Pool &) |
| Public Member Functions inherited from log4cxx::spi::OptionHandler | |
| virtual | ~OptionHandler () |
| void | activateOptions (helpers::Pool &) |
| virtual void | setOption (const LogString &option, const LogString &value) |
Set option to value. | |
| Public Member Functions inherited from log4cxx::helpers::Object | |
| 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 |
Protected Member Functions | |
| size_t | getFormattedEventCharacterCount () const |
| The expected length of a formatted event excluding the message text. | |
Extend this abstract class to create your own log layout format.
|
virtual |
|
overridevirtual |
Activate the options that were previously set with calls to option setters.
No action is performed in this implementation.
Implements log4cxx::spi::OptionHandler.
Reimplemented in log4cxx::PatternLayout.
|
virtual |
Append the footer for the layout format.
The base class does nothing.
Reimplemented in log4cxx::HTMLLayout.
| void log4cxx::Layout::appendFooter | ( | LogString & | output, |
| helpers::Pool & | p ) |
|
virtual |
Append the header for the layout format.
The base class does nothing.
Reimplemented in log4cxx::HTMLLayout.
| void log4cxx::Layout::appendHeader | ( | LogString & | output, |
| helpers::Pool & | p ) |
|
pure virtual |
Implement this method to create your own layout format.
Implemented in log4cxx::FMTLayout, log4cxx::HTMLLayout, log4cxx::JSONLayout, log4cxx::PatternLayout, log4cxx::SimpleLayout, and log4cxx::xml::XMLLayout.
| void log4cxx::Layout::format | ( | LogString & | output, |
| const spi::LoggingEventPtr & | event, | ||
| helpers::Pool & | p ) const |
|
virtual |
Returns the content type output by this layout.
The base class returns "text/plain".
Reimplemented in log4cxx::HTMLLayout, and log4cxx::JSONLayout.
|
protected |
The expected length of a formatted event excluding the message text.
|
pure virtual |
If the layout handles the throwable object contained within LoggingEvent, then the layout should return false.
Otherwise, if the layout ignores throwable object, then the layout should return true.
The SimpleLayout, FMTLayout and PatternLayout return true. The other layouts return false.
Implemented in log4cxx::FMTLayout, log4cxx::HTMLLayout, log4cxx::JSONLayout, log4cxx::PatternLayout, log4cxx::SimpleLayout, and log4cxx::xml::XMLLayout.