Apache Log4cxx: log4cxx::HTMLLayout Class Reference (original) (raw)

This layout outputs events in a HTML table. More...

#include <[htmllayout.h](htmllayout%5F8h%5Fsource.html)>

Public Member Functions
HTMLLayout ()
~HTMLLayout ()
void setLocationInfo (bool locationInfoFlag)
The LocationInfo option takes a boolean value.
bool getLocationInfo () const
Returns the current value of the LocationInfo option.
void setTitle (const LogString &title1)
The Title option takes a String value.
const LogString & getTitle () const
Returns the current value of the Title option.
LogString getContentType () const override
Returns the content type output by this layout, i.e "text/html".
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 option to value.
void format (LogString &output, const spi::LoggingEventPtr &event, helpers::Pool &pool) const override
Implement this method to create your own layout format.
void appendHeader (LogString &output, helpers::Pool &pool) override
Append appropriate HTML headers.
void appendFooter (LogString &output, helpers::Pool &pool) override
Append the appropriate HTML footers.
bool ignoresThrowable () const override
The HTML layout handles the throwable contained in logging events.
- Public Member Functions inherited from log4cxx::Layout
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.
- 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

This layout outputs events in a HTML table.

log4cxx::HTMLLayout::HTMLLayout ( )

~HTMLLayout()

log4cxx::HTMLLayout::~HTMLLayout ( )

activateOptions()

void log4cxx::HTMLLayout::activateOptions ( helpers::Pool & ) inlineoverridevirtual

Activate the options that were previously set with calls to option setters.

No action is performed in this implementation.

Implements log4cxx::spi::OptionHandler.

appendFooter()

appendHeader()

format()

Implement this method to create your own layout format.

Implements log4cxx::Layout.

getContentType()

LogString log4cxx::HTMLLayout::getContentType ( ) const overridevirtual

Returns the content type output by this layout, i.e "text/html".

Reimplemented from log4cxx::Layout.

getLocationInfo()

bool log4cxx::HTMLLayout::getLocationInfo ( ) const

Returns the current value of the LocationInfo option.

getTitle()

const LogString & log4cxx::HTMLLayout::getTitle ( ) const

Returns the current value of the Title option.

ignoresThrowable()

bool log4cxx::HTMLLayout::ignoresThrowable ( ) const overridevirtual

The HTML layout handles the throwable contained in logging events.

Hence, this method return false.

Implements log4cxx::Layout.

setLocationInfo()

void log4cxx::HTMLLayout::setLocationInfo ( bool locationInfoFlag )

The LocationInfo option takes a boolean value.

By default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

If you are embedding this layout within an [SMTPAppender](classlog4cxx%5F1%5F1net%5F1%5F1SMTPAppender.html) then make sure to set the LocationInfo option of that appender as well.

setOption()

void log4cxx::HTMLLayout::setOption ( const LogString & option, const LogString & value ) overridevirtual

Set option to value.

Supported options Supported values Default value
Title {any} Log4cxx Log Messages
LocationInfo True,False False

Implements log4cxx::spi::OptionHandler.

setTitle()

void log4cxx::HTMLLayout::setTitle ( const LogString & title1 )

The Title option takes a String value.

This option sets the document title of the generated HTML document.

Defaults to 'Log4cxx Log Messages'.


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