HydraExpress 4.7 |
HydraExpress C++ API Reference Guide |
Product Documentation:
Documentation Home |
Reformats log messages with the message's log level and a timestamp. More...
#include <rwsf/core/LogTimeFormatter.h>
Inherits rwsf::LogFormatterImp.
Additional Inherited Members | |
Public Member Functions inherited from rwsf::LogFormatterImp | |
virtual | ~LogFormatterImp () |
virtual std::string | format (Logger::LogLevel level, const std::string &message)=0 |
virtual std::string | getEpilog () const |
virtual std::string | getProlog () const |
Protected Member Functions inherited from rwsf::BodyBase | |
BodyBase (void) | |
BodyBase (const BodyBase &second) | |
virtual | ~BodyBase (void) |
BodyBase & | operator= (const BodyBase &second) |
The LogTimeFormatter prepends the message with the message's log level and a timestamp. This information is separated by a bar (|) character.
Do not instantiate this class directly. Instead, use ".createLogTimeFormatter" in the logger configuration file when specifying a formatter property. For more information on the Agent logger, see the logging chapter in the User Guide.
The following example demonstrates using the LogTimeFormatter in a logger configuration file, typically <installdir>\conf\loggers.xml
:
Example of formatted output in a log file:
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.