Apache log4cxx  Version 0.10.0
Layout Class Reference

Extend this abstract class to create your own log layout format. More...

Inheritance diagram for Layout:
OptionHandler ObjectImpl Object Object DateLayout HTMLLayout PatternLayout SimpleLayout XMLLayout TTCCLayout

List of all members.

Public Member Functions

virtual ~Layout ()
void addRef () const
void releaseRef () const
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.

Detailed Description

Extend this abstract class to create your own log layout format.


Constructor & Destructor Documentation

virtual ~Layout ( ) [virtual]

Member Function Documentation

void addRef ( ) const [virtual]

Reimplemented from ObjectImpl.

virtual void appendFooter ( LogString output,
log4cxx::helpers::Pool p 
) [virtual]

Append the footer for the layout format.

The base class does nothing.

Reimplemented in HTMLLayout.

virtual void appendHeader ( LogString output,
log4cxx::helpers::Pool p 
) [virtual]

Append the header for the layout format.

The base class does nothing.

Reimplemented in HTMLLayout.

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

Implement this method to create your own layout format.

Implemented in PatternLayout, TTCCLayout, XMLLayout, HTMLLayout, and SimpleLayout.

virtual LogString getContentType ( ) const [virtual]

Returns the content type output by this layout.

The base class returns "text/plain".

Reimplemented in HTMLLayout.

virtual bool ignoresThrowable ( ) const [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, TTCCLayout, PatternLayout all return true. The XMLLayout returns false.

Implemented in PatternLayout, TTCCLayout, XMLLayout, HTMLLayout, and SimpleLayout.

void releaseRef ( ) const [virtual]

Reimplemented from ObjectImpl.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines