|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
String stream that collects one message and, when destroyed, passes it to the singleton as a LogRecord. More...
#include <Logger.hh>
Inherits std::stringstream.
Public Types | |
| typedef Logger::LEVEL | level_t |
| Alias for Logger::LEVEL. | |
Public Member Functions | |
| LogStream (const std::string &logname, const level_t &sev, const char *file=0, int line=-1) | |
| Store the logger name, level and source location; ok() starts as LOGGER.logging(sev). | |
| virtual | ~LogStream () |
| Pass the collected text to LOGGER.log() as a LogRecord. | |
| std::ostream & | logger_ostream () |
| Return this stream as a std::ostream reference. | |
| const char * | file () const |
| Return the source file name given to the constructor. | |
| const int | line () const |
| Return the source line given to the constructor. | |
| bool | ok () const |
| get the state of the stream | |
| void | finish () |
| Set ok() to false; MSGSTREAM uses this to end its one-pass loop. | |
String stream that collects one message and, when destroyed, passes it to the singleton as a LogRecord.
Used by the MSG, MSGLOG and MSGSTREAM macros.
Alias for Logger::LEVEL.
| Logger::LogStream::LogStream | ( | const std::string & | logname, |
| const level_t & | sev, | ||
| const char * | file = 0, |
||
| int | line = -1 |
||
| ) |
Store the logger name, level and source location; ok() starts as LOGGER.logging(sev).
|
inlinevirtual |
Pass the collected text to LOGGER.log() as a LogRecord.
This happens whether or not the level is enabled; the macros check the level before creating the stream.
|
inline |
Return the source file name given to the constructor.
|
inline |
Set ok() to false; MSGSTREAM uses this to end its one-pass loop.
|
inline |
Return the source line given to the constructor.
|
inline |
Return this stream as a std::ostream reference.
|
inline |
get the state of the stream