Apache log4cxx  Version 0.13.0
log4cxx::HTMLLayout Class Reference

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

#include <htmllayout.h>

Inheritance diagram for log4cxx::HTMLLayout:
log4cxx::Layout log4cxx::spi::OptionHandler log4cxx::helpers::Object log4cxx::helpers::Object

Public Member Functions

 HTMLLayout ()
 
void setLocationInfo (bool locationInfoFlag)
 The LocationInfo option takes a boolean value. More...
 
bool getLocationInfo () const
 Returns the current value of the LocationInfo option. More...
 
void setTitle (const LogString &title1)
 The Title option takes a String value. More...
 
const LogStringgetTitle () const
 Returns the current value of the Title option. More...
 
virtual LogString getContentType () const
 Returns the content type output by this layout, i.e "text/html". More...
 
virtual void activateOptions (log4cxx::helpers::Pool &)
 No options to activate. More...
 
virtual void setOption (const LogString &option, const LogString &value)
 Set options. More...
 
virtual void format (LogString &output, const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool) const
 Implement this method to create your own layout format. More...
 
virtual void appendHeader (LogString &output, log4cxx::helpers::Pool &pool)
 Append appropriate HTML headers. More...
 
virtual void appendFooter (LogString &output, log4cxx::helpers::Pool &pool)
 Append the appropriate HTML footers. More...
 
virtual bool ignoresThrowable () const
 The HTML layout handles the throwable contained in logging events. More...
 
- Public Member Functions inherited from log4cxx::Layout
virtual ~Layout ()
 
- Public Member Functions inherited from log4cxx::spi::OptionHandler
virtual ~OptionHandler ()
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Detailed Description

This layout outputs events in a HTML table.

Constructor & Destructor Documentation

◆ HTMLLayout()

log4cxx::HTMLLayout::HTMLLayout ( )

Member Function Documentation

◆ activateOptions()

virtual void log4cxx::HTMLLayout::activateOptions ( log4cxx::helpers::Pool )
inlinevirtual

No options to activate.

Implements log4cxx::spi::OptionHandler.

◆ appendFooter()

virtual void log4cxx::HTMLLayout::appendFooter ( LogString output,
log4cxx::helpers::Pool pool 
)
virtual

Append the appropriate HTML footers.

Reimplemented from log4cxx::Layout.

◆ appendHeader()

virtual void log4cxx::HTMLLayout::appendHeader ( LogString output,
log4cxx::helpers::Pool pool 
)
virtual

Append appropriate HTML headers.

Reimplemented from log4cxx::Layout.

◆ format()

virtual void log4cxx::HTMLLayout::format ( LogString output,
const spi::LoggingEventPtr event,
log4cxx::helpers::Pool pool 
) const
virtual

Implement this method to create your own layout format.

Implements log4cxx::Layout.

◆ getContentType()

virtual LogString log4cxx::HTMLLayout::getContentType ( ) const
inlinevirtual

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

Reimplemented from log4cxx::Layout.

◆ getLocationInfo()

bool log4cxx::HTMLLayout::getLocationInfo ( ) const
inline

Returns the current value of the LocationInfo option.

◆ getTitle()

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

Returns the current value of the Title option.

◆ ignoresThrowable()

virtual bool log4cxx::HTMLLayout::ignoresThrowable ( ) const
inlinevirtual

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)
inline

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 then make sure to set the LocationInfo option of that appender as well.

◆ setOption()

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

Set options.

Implements log4cxx::spi::OptionHandler.

◆ setTitle()

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

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: