activemq::logger::Formatter Class Reference

#include <Formatter.h>

Inheritance diagram for activemq::logger::Formatter:

activemq::logger::SimpleFormatter List of all members.

Public Member Functions

virtual ~Formatter (void)
virtual std::string format (const LogRecord &record) const =0
virtual std::string formatMessage (const LogRecord &record) const =0
virtual std::string getHead (const Handler *handler)=0
virtual std::string getTail (const Handler *handler)=0

Detailed Description

A Formatter provides support for formatting LogRecords.

Typically each logging Handler will have a Formatter associated with it. The Formatter takes a LogRecord and converts it to a string.

Some formatters (such as the XMLFormatter) need to wrap head and tail strings around a set of formatted records. The getHeader and getTail methods can be used to obtain these strings.


Constructor & Destructor Documentation

virtual activemq::logger::Formatter::~Formatter void   )  [inline, virtual]
 


Member Function Documentation

virtual std::string activemq::logger::Formatter::format const LogRecord record  )  const [pure virtual]
 

Format the given log record and return the formatted string.

Parameters:
record The Log Record to Format
Returns:
the formatted record.

Implemented in activemq::logger::SimpleFormatter.

virtual std::string activemq::logger::Formatter::formatMessage const LogRecord record  )  const [pure virtual]
 

Format the message string from a log record.

Parameters:
record The Log Record to Format
Returns:
the formatted message

Implemented in activemq::logger::SimpleFormatter.

virtual std::string activemq::logger::Formatter::getHead const Handler handler  )  [pure virtual]
 

Return the header string for a set of formatted records. In the default implementation this method should return empty string

Parameters:
handler the target handler, can be null
Returns:
the head string

Implemented in activemq::logger::SimpleFormatter.

virtual std::string activemq::logger::Formatter::getTail const Handler handler  )  [pure virtual]
 

Return the tail string for a set of formatted records. In the default implementation this method should return empty string

Parameters:
handler the target handler, can be null
Returns:
the tail string

Implemented in activemq::logger::SimpleFormatter.


The documentation for this class was generated from the following file:
Generated on Thu Aug 3 18:03:33 2006 for activemq-cpp by  doxygen 1.4.5