|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Declares the psalg logging classes (Logger singleton, LogStream, LogRecord, LogFormatter, LogHandler, LogHandlerStdStreams) and the MSG, MSGLOG and MSGSTREAM macros. More...
#include <vector>#include <string>#include <sstream>Classes | |
| class | Logger::Logger |
| Singleton logger (instance()) with a minimum level and a list of handlers; log() passes each record to every handler. More... | |
| class | Logger::LogStream |
| String stream that collects one message and, when destroyed, passes it to the singleton as a LogRecord. More... | |
| class | Logger::LogRecord |
| One log message: logger name (held by reference), level, source file and line, and a pointer to the stream buffer with the text. More... | |
| class | Logger::LogFormatter |
| Formats a LogRecord as: the time (if a time format is set), the 4-digit record counter, the 3-letter level, for levels other than INFO the file name (without directories), a colon and the line number, and the message text. More... | |
| class | Logger::LogHandler |
| Abstract handler that writes LogRecords with a LogFormatter it owns (a default one is created on first use if none was set). More... | |
| class | Logger::LogHandlerStdStreams |
| Handler that formats records of level INFO or lower to stdout and higher levels to stderr, each followed by std::endl. More... | |
Namespaces | |
| namespace | Logger |
Macros | |
| #define | LL Logger::Logger |
| Shortcut for Logger::Logger. | |
| #define | LOGGER (*LL::instance()) |
| The singleton logger, (*Logger::Logger::instance()). | |
| #define | __MACROPARS __FILE__,__LINE__ |
| Expands to FILE,LINE. | |
| #define | MSGLOG(logger, sev, msg) |
| If level sev is enabled, stream msg into a LogStream with logger name logger and the current file and line; it is logged when the statement ends. | |
| #define | MSG(sev, msg) |
| If level sev is enabled, stream msg into a LogStream with an empty logger name and the current file and line; it is logged when the statement ends. | |
| #define | MSGSTREAM(sev, strm) |
| If level sev is enabled, run the following statement or block once with a LogStream named strm (empty logger name), then log what was written to it. | |
Declares the psalg logging classes (Logger singleton, LogStream, LogRecord, LogFormatter, LogHandler, LogHandlerStdStreams) and the MSG, MSGLOG and MSGSTREAM macros.
| #define __MACROPARS __FILE__,__LINE__ |
Expands to FILE,LINE.
| #define LL Logger::Logger |
Shortcut for Logger::Logger.
| #define LOGGER (*LL::instance()) |
The singleton logger, (*Logger::Logger::instance()).
| #define MSG | ( | sev, | |
| msg | |||
| ) |
If level sev is enabled, stream msg into a LogStream with an empty logger name and the current file and line; it is logged when the statement ends.
| #define MSGLOG | ( | logger, | |
| sev, | |||
| msg | |||
| ) |
If level sev is enabled, stream msg into a LogStream with logger name logger and the current file and line; it is logged when the statement ends.
| #define MSGSTREAM | ( | sev, | |
| strm | |||
| ) |
If level sev is enabled, run the following statement or block once with a LogStream named strm (empty logger name), then log what was written to it.