A Formatter provides support for formatting LogRecords.
More...
#include <src/main/decaf/util/logging/Formatter.h>
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 decaf::util::logging::Formatter::~Formatter |
( |
| ) |
|
|
inlinevirtual |
Member Function Documentation
virtual std::string decaf::util::logging::Formatter::format |
( |
const LogRecord & |
record | ) |
const |
|
pure virtual |
virtual std::string decaf::util::logging::Formatter::formatMessage |
( |
const LogRecord & |
record | ) |
const |
|
virtual |
Format the message string from a log record.
- Parameters
-
record | The Log Record to Format |
- Returns
- the formatted message
virtual std::string decaf::util::logging::Formatter::getHead |
( |
const Handler *handler |
DECAF_UNUSED | ) |
|
|
inlinevirtual |
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.
virtual std::string decaf::util::logging::Formatter::getTail |
( |
const Handler *handler |
DECAF_UNUSED | ) |
|
|
inlinevirtual |
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
The documentation for this class was generated from the following file: