nidas v1.2.3
|
SampleTracer uses a Logger to log messages about samples as they are encountered in the code. More...
#include <SampleTracer.h>
Public Member Functions | |
SampleTracer (int level, const char *file, const char *function, int line) | |
bool | active (const Sample *samp) |
bool | active (dsm_sample_id_t id) |
nidas::util::LogMessage & | msg (const Sample *samp=0, const std::string &text="") |
Format a basic log message tracing the given the sample, using text as a prefix, then return a reference to this instance's LogMessage so more information can be streamed to it. | |
nidas::util::LogMessage & | msg (dsm_time_t tt, dsm_sample_id_t sid, const std::string &text="") |
Static Public Member Functions | |
static std::string | format_time (dsm_time_t tt) |
static std::string | format_time (dsm_time_t tt, const std::string &format) |
Private Attributes | |
nidas::util::LogContext | _context |
nidas::util::LogMessage | _msg |
nidas::core::SampleMatcher | _matcher |
SampleTracer uses a Logger to log messages about samples as they are encountered in the code.
The samples are selected by ID using a SampleMatcher, whose criteria are specified in the 'trace_samples' log parameter.
|
inline |
|
inlinestatic |
References nidas::util::UTime::format().
Referenced by msg(), msg(), and nidas::core::SampleSorter::receive().
|
inlinestatic |
References nidas::util::UTime::format().
|
inline |
Format a basic log message tracing the given the sample, using text as a prefix, then return a reference to this instance's LogMessage so more information can be streamed to it.
The 'endlog' manipulator must be streamed to the return value to actually log the message. For example:
With no arguments, no message is added, just the LogMessage reference is returned, allowing more information to be streamed to an existing message.
References _msg, format_time(), GET_DSM_ID, and GET_SPS_ID.
|
inline |
References _msg, format_time(), GET_DSM_ID, and GET_SPS_ID.
|
private |
|
private |
Referenced by active(), active(), and SampleTracer().
|
private |