HTMLLayout Class Reference

Inheritance diagram for HTMLLayout:

Inheritance graph
[legend]
Collaboration diagram for HTMLLayout:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void setLocationInfo (bool flocationInfoag)
bool getLocationInfo () const
void setTitle (const String &title)
const String & getTitle () const
virtual String getContentType () const
virtual void activateOptions ()
virtual void setOption (const String &option, const String &value)
virtual void format (ostream &output, const spi::LoggingEventPtr &event) const
virtual void appendHeader (ostream &output)
virtual void appendFooter (ostream &output)
virtual bool ignoresThrowable () const


Detailed Description

This layout outputs events in a HTML table.

Member Function Documentation

void setLocationInfo ( bool  flocationInfoag  )  [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.

bool getLocationInfo (  )  const [inline]

Returns the current value of the LocationInfo option.

void setTitle ( const String &  title  )  [inline]

The Title option takes a String value. This option sets the document title of the generated HTML document.

Defaults to 'Log4cxx Log Messages'.

const String& getTitle (  )  const [inline]

Returns the current value of the Title option.

virtual String getContentType (  )  const [inline, virtual]

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

Reimplemented from Layout.

virtual void activateOptions (  )  [inline, virtual]

No options to activate.

Implements OptionHandler.

void setOption ( const String &  option,
const String &  value 
) [virtual]

Set options

Implements OptionHandler.

void format ( ostream &  output,
const spi::LoggingEventPtr event 
) const [virtual]

Implement this method to create your own layout format.

Implements Layout.

void appendHeader ( ostream &  output  )  [virtual]

Append appropriate HTML headers.

Reimplemented from Layout.

void appendFooter ( ostream &  output  )  [virtual]

Append the appropriate HTML footers.

Reimplemented from Layout.

virtual bool ignoresThrowable (  )  const [inline, virtual]

The HTML layout handles the throwable contained in logging events. Hence, this method return false.

Implements Layout.


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

Generated on Mon May 26 17:02:47 2008 for log4cxx by  doxygen 1.5.5