mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 22:30:57 +00:00
fix(telemetry): log without JLOG in the beast insight collector
JLOG is defined in xrpl/basics/Log.h, and libxrpl.beast cannot include xrpl.basics -- basics depends on beast, not the reverse. Use the journal stream idiom the rest of the file already uses.
This commit is contained in:
@@ -929,14 +929,20 @@ OTelCollectorImp::onCollectionReady()
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
JLOG(journal_.error()) << "OTelCollector: could not register an observable gauge, "
|
||||
"so that metric will not be exported: "
|
||||
<< e.what();
|
||||
if (auto stream = journal_.error())
|
||||
{
|
||||
stream << "OTelCollector: could not register an observable gauge, so that "
|
||||
"metric will not be exported: "
|
||||
<< e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JLOG(journal_.info()) << "OTelCollector: registered " << armed << " of " << gauges.size()
|
||||
<< " observable gauges";
|
||||
if (auto stream = journal_.info())
|
||||
{
|
||||
stream << "OTelCollector: registered " << armed << " of " << gauges.size()
|
||||
<< " observable gauges";
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -953,7 +959,8 @@ OTelCollectorImp::onCollectionStopping()
|
||||
for (auto* gauge : gauges)
|
||||
gauge->disarm();
|
||||
|
||||
JLOG(journal_.info()) << "OTelCollector: stopped observing " << gauges.size() << " gauges";
|
||||
if (auto stream = journal_.info())
|
||||
stream << "OTelCollector: stopped observing " << gauges.size() << " gauges";
|
||||
}
|
||||
|
||||
opentelemetry::nostd::shared_ptr<metrics_api::Meter> const&
|
||||
|
||||
Reference in New Issue
Block a user