Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix verbosity #32

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/MonitorableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@

#include <chrono>


/**
* @brief Name used by TRACE TLOG calls from this source file
*/
#define TRACE_NAME "MonitorableObject" // NOLINT
enum {
TLVL_MONITORING_STEPS = 10,
TLVL_LEVEL_SUPPRESSION = 20,
};

using namespace dunedaq::opmonlib;

std::shared_ptr<OpMonFacility> MonitorableObject::s_default_facility = std::make_shared<NullOpMonFacility>();
Expand Down Expand Up @@ -54,7 +64,7 @@ void MonitorableObject::publish( google::protobuf::Message && m,
auto start_time = std::chrono::high_resolution_clock::now();

if ( ! MonitorableObject::publishable_metric( l, get_opmon_level() ) ) {
// MR: add a debut statement with trace
TLOG_DEBUG(TLVL_LEVEL_SUPPRESSION) << "Metric " << m.GetTypeName() << " ignored because of the level";
++m_ignored_counter;
return;
}
Expand Down Expand Up @@ -92,7 +102,7 @@ opmon::MonitoringTreeInfo MonitorableObject::collect() noexcept {

auto start_time = std::chrono::high_resolution_clock::now();

TLOG() << "Collecting data from " << to_string(get_opmon_id());
TLOG_DEBUG(TLVL_MONITORING_STEPS) << "Collecting data from " << to_string(get_opmon_id());

opmon::MonitoringTreeInfo info;

Expand Down
Loading