8 #ifndef NIDAS_CORE_SAMPLETRACER_H
9 #define NIDAS_CORE_SAMPLETRACER_H
13 namespace nidas {
namespace core {
25 SampleTracer(
int level,
const char* file,
const char*
function,
int line);
39 inline static std::string
45 inline static std::string
71 msg(
const Sample* samp = 0,
const std::string& text =
"")
102 #endif // NIDAS_CORE_SAMPLETRACER_H
#define GET_DSM_ID(tid)
Definition: Sample.h:81
A class for parsing, formatting and doing operations on time, based on Unix time conventions, where leap seconds are ignored, so that there are always 60 seconds in a minute, 3600 seconds in an hour and 86400 seconds in a day.
Definition: UTime.h:76
std::string format(bool utc, const std::string &fmt) const
Format a UTime into a string.
Definition: UTime.cc:433
unsigned int dsm_sample_id_t
Definition: Sample.h:63
The LogContext is created at a point in the application code and filled in with details about that lo...
Definition: Logger.h:382
SampleTracer(int level, const char *file, const char *function, int line)
Definition: SampleTracer.cc:14
bool match(dsm_sample_id_t id)
Return true if the given id satisfies the current range criteria.
Definition: SampleMatcher.cc:106
A class for formatting and streaming a log message.
Definition: Logger.h:895
long long dsm_time_t
Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC...
Definition: Sample.h:61
nidas::core::SampleMatcher _matcher
Definition: SampleTracer.h:96
nidas::util::LogMessage & msg(dsm_time_t tt, dsm_sample_id_t sid, const std::string &text="")
Definition: SampleTracer.h:85
bool active() const
Return true if log messages from this context would be accepted.
Definition: Logger.h:406
bool active(const Sample *samp)
Definition: SampleTracer.h:28
nidas::util::LogContext _context
Definition: SampleTracer.h:94
nidas::util::LogMessage _msg
Definition: SampleTracer.h:95
Interface to a data sample.
Definition: Sample.h:189
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 refere...
Definition: SampleTracer.h:71
static std::string format_time(dsm_time_t tt, const std::string &format)
Definition: SampleTracer.h:46
bool active(dsm_sample_id_t id)
Definition: SampleTracer.h:34
static std::string format_time(dsm_time_t tt)
Definition: SampleTracer.h:40
Match samples according to DSM and Sample ID ranges, and configure the ranges with criteria in text f...
Definition: SampleMatcher.h:20
SampleTracer uses a Logger to log messages about samples as they are encountered in the code...
Definition: SampleTracer.h:22
#define GET_SPS_ID(tid)
Definition: Sample.h:84