EPICS ARCHIVER V4
|
A trace or logging facility. More...
#include <MsgLogger.h>
Public Member Functions | |
MsgLogger (const char *filename=0) | |
Construct a new logger. More... | |
virtual | ~MsgLogger () |
Destructor. More... | |
void | log (const char *format, va_list ap) __attribute__((format(printf |
Log some text. More... | |
Friends | |
void | LOG_MSG (const char *format, va_list ap) |
Log message. | |
A trace or logging facility.
The following printf and assert-like macros routines and macros will call TheMsgLogger->log:
If no logger is created by the application, LOG_... will create a default logger for stderr.
MsgLogger::MsgLogger | ( | const char * | filename = 0 | ) |
Construct a new logger.
This logger replaces the existing logger, in case there is one. If no filename (null or empty string) is supplied, stderr is used. If a filename is provided, that file is opened or created for appending.
filename,: | file name |
GenericException | if file fails to open. |
|
virtual |
Destructor.
Will restore whatever previous logger was in place.
void MsgLogger::log | ( | const char * | format, |
va_list | ap | ||
) |
Log some text.
Prepends info with time stamp, then invokes print.