activemq-cpp-3.6.0
decaf::util::logging::XMLFormatter Class Reference

Format a LogRecord into a standard XML format. More...

#include <src/main/decaf/util/logging/XMLFormatter.h>

Inheritance diagram for decaf::util::logging::XMLFormatter:

Public Member Functions

 XMLFormatter ()
virtual ~XMLFormatter ()
virtual std::string format (const LogRecord &record) const
 Converts a LogRecord into an XML string.
virtual std::string getHead (const Handler *handler)
 Returns the header string for a set of log records formatted as XML strings, using the output handler's encoding if it is defined, otherwise using the default platform encoding.
virtual std::string getTail (const Handler *handler)
 Returns the tail string for a set of log records formatted as XML strings.
- Public Member Functions inherited from decaf::util::logging::Formatter
virtual ~Formatter ()
virtual std::string formatMessage (const LogRecord &record) const
 Format the message string from a log record.
virtual std::string getHead (const Handler *handler DECAF_UNUSED)
 Return the header string for a set of formatted records.
virtual std::string getTail (const Handler *handler DECAF_UNUSED)
 Return the tail string for a set of formatted records.

Detailed Description

Format a LogRecord into a standard XML format.

TODO - Currently only outputs UTF-8 The XMLFormatter can be used with arbitrary character encodings, but it is recommended that it normally be used with UTF-8. The character encoding can be set on the output Handler.

Since
1.0

Constructor & Destructor Documentation

decaf::util::logging::XMLFormatter::XMLFormatter ( )
virtual decaf::util::logging::XMLFormatter::~XMLFormatter ( )
virtual

Member Function Documentation

virtual std::string decaf::util::logging::XMLFormatter::format ( const LogRecord record) const
virtual

Converts a LogRecord into an XML string.

Parameters
recordThe log record to be formatted.
Returns
the log record formatted as an XML string.

Implements decaf::util::logging::Formatter.

virtual std::string decaf::util::logging::XMLFormatter::getHead ( const Handler handler)
virtual

Returns the header string for a set of log records formatted as XML strings, using the output handler's encoding if it is defined, otherwise using the default platform encoding.

Parameters
handlerThe output handler, may be NULL.
Returns
the header string for log records formatted as XML strings.
virtual std::string decaf::util::logging::XMLFormatter::getTail ( const Handler handler)
virtual

Returns the tail string for a set of log records formatted as XML strings.

Parameters
handlerThe output handler, may be NULL.
Returns
the tail string for log records formatted as XML strings.

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