From 178bbbf59e46a4612ef859bc30cd0c448b3efc06 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Wed, 11 Mar 2026 11:05:34 +0000 Subject: [PATCH] Fix OTelCollector: Journal::info is a method, not a bool member The beast::Journal stream accessors (info, warn, etc.) are methods that return a Stream object. They must be called with () to test if the log level is active. Co-Authored-By: Claude Opus 4.6 --- src/libxrpl/beast/insight/OTelCollector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libxrpl/beast/insight/OTelCollector.cpp b/src/libxrpl/beast/insight/OTelCollector.cpp index 5386ffa831..46e6563fd8 100644 --- a/src/libxrpl/beast/insight/OTelCollector.cpp +++ b/src/libxrpl/beast/insight/OTelCollector.cpp @@ -631,7 +631,7 @@ OTelCollectorImp::OTelCollectorImp( Journal journal) : m_journal(journal), m_prefix(prefix) { - if (m_journal.info) + if (m_journal.info()) m_journal.info() << "OTelCollector starting: endpoint=" << endpoint << " prefix=" << m_prefix; @@ -684,13 +684,13 @@ OTelCollectorImp::OTelCollectorImp( // Create the OTel Meter for creating instruments. m_otelMeter = m_provider->GetMeter("rippled_metrics", "1.0.0"); - if (m_journal.info) + if (m_journal.info()) m_journal.info() << "OTelCollector started successfully"; } OTelCollectorImp::~OTelCollectorImp() { - if (m_journal.info) + if (m_journal.info()) m_journal.info() << "OTelCollector shutting down"; if (m_provider) { @@ -698,7 +698,7 @@ OTelCollectorImp::~OTelCollectorImp() m_provider->ForceFlush(); m_provider->Shutdown(); } - if (m_journal.info) + if (m_journal.info()) m_journal.info() << "OTelCollector stopped"; }