LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
an abstract class for formatting log records into a text stream. More...
#include <LogFormatter.h>
Public Member Functions | |
LogFormatter () | |
LogFormatter (const LogFormatter &that) | |
virtual | ~LogFormatter () |
LogFormatter & | operator= (const LogFormatter &that) |
virtual void | write (std::ostream *strm, const LogRecord &rec)=0 |
an abstract class for formatting log records into a text stream.
Implementations of this class actually write log messages to a stream in a particular format. The messages come in as LogRecord objects, which stores its data in a PropertySet object. The formatter can expect certain properties to be given specific names. The following are standard names:
Name type meaning LOG string the name of the Log producing the message COMMENT string a simple text message TIMESTAMP DateTime the timestamp when the message was recorded DATE string the value of TIMESTAMP in ISO format HOST string the hostname of the machine IP string the IP address of the host PID int the process id of the application NODE int a logical node id in a multi-process application
Only LOG is guaranteed to appear. There may be multiple COMMENT properties, each with a complete thought. All other standard names should only have one value associated with it. If there are multiple values, only the last one should be considered valid.
Definition at line 73 of file LogFormatter.h.
|
inline |
|
inline |
|
virtual |
delete the formatter
|
inline |
copy another formatter into this one
Definition at line 94 of file LogFormatter.h.
|
pure virtual |
write out a log record to a stream
strm | pointer to the output stream to write the record to. If the pointer is null, nothing is written. |
rec | the record to write |
Implemented in lsst::pex::logging::NetLoggerFormatter, lsst::pex::logging::IndentedFormatter, and lsst::pex::logging::BriefFormatter.