HydraExpress™ C++ 2019 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Reformats log messages with extra logging details. More...
#include <rwsf/core/LogFormatter.h>
Public Member Functions | |
std::string | format (Logger::LogLevel level, const std::string &message) |
std::string | getEpilog () const |
std::string | getProlog () const |
Public Member Functions inherited from rwsf::HandleBase | |
bool | isValid (void) const |
bool | operator!= (const HandleBase &second) const |
bool | operator== (const HandleBase &second) const |
Additional Inherited Members | |
Protected Member Functions inherited from rwsf::HandleBase | |
HandleBase (void) | |
HandleBase (StaticCtor) | |
HandleBase (BodyBase *body) | |
HandleBase (const HandleBase &second) | |
virtual | ~HandleBase (void) |
BodyBase & | body (void) const |
HandleBase & | operator= (const HandleBase &second) |
Log Formatters are used to reformat log messages with extra logging details, such as a timestamp or the logging level of the message. To set up an rwsf::LogFormatter for use, place the proper create method for the specific formatter in your loggers configuration file (typically <installdir>\conf\loggers.xml
):
Log Formatters should not be constructed in code. Instead use the appropriate configuration file as shown above.
See specific log formatter implementations for more information. Currently the only available implementation is rwsf::LogTimeFormatter.
std::string rwsf::LogFormatter::format | ( | Logger::LogLevel | level, |
const std::string & | message | ||
) |
Formats the given logger message with log level level. The message should be a printable std::string.
std::string rwsf::LogFormatter::getEpilog | ( | ) | const |
Returns the epilog that is appended to every log message.
std::string rwsf::LogFormatter::getProlog | ( | ) | const |
Returns the prolog that is prepended to every log message.
Copyright © 2019 Rogue Wave Software, Inc. All Rights Reserved. |