From e83e2b2fe660bca4bee0d0deaca95a51df8fa77d Mon Sep 17 00:00:00 2001 From: Alexander Indenbaum Date: Thu, 25 Sep 2025 11:04:54 +0300 Subject: [PATCH] nvmeof: use fmt::format() instead of std::hex stream manipulators Signed-off-by: Alexander Indenbaum --- src/nvmeof/NVMeofGwMonitorClient.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nvmeof/NVMeofGwMonitorClient.cc b/src/nvmeof/NVMeofGwMonitorClient.cc index 0839736b34e..e75c591be90 100644 --- a/src/nvmeof/NVMeofGwMonitorClient.cc +++ b/src/nvmeof/NVMeofGwMonitorClient.cc @@ -12,6 +12,7 @@ */ #include +#include #include "common/errno.h" #include "common/signal.h" @@ -254,8 +255,8 @@ void NVMeofGwMonitorClient::send_beacon() // Check if NVMEOF_BEACON_DIFF feature is supported by the cluster bool include_diff = HAVE_FEATURE(cluster_features, NVMEOF_BEACON_DIFF); - dout(10) << "Cluster features: 0x" << std::hex << cluster_features << std::dec - << ", NVMEOF_BEACON_DIFF supported: " << (include_diff ? "yes" : "no") << dendl; + dout(10) << fmt::format("Cluster features: 0x{:x}, NVMEOF_BEACON_DIFF supported: {}", + cluster_features, include_diff ? "yes" : "no") << dendl; // Send beacon with appropriate version based on cluster features auto m = ceph::make_message( @@ -517,12 +518,12 @@ Dispatcher::dispatch_result_t NVMeofGwMonitorClient::ms_dispatch2(const ref_tget_connection()) { uint64_t features = m->get_connection()->get_features(); - dout(4) << "Monitor connection features: 0x" << std::hex << features << std::dec << dendl; + dout(4) << fmt::format("Monitor connection features: 0x{:x}", features) << dendl; // Update cluster features with the union of all seen features // This ensures we track the highest level of features supported by the cluster cluster_features |= features; - dout(10) << "Updated cluster features: 0x" << std::hex << cluster_features << std::dec << dendl; + dout(10) << fmt::format("Updated cluster features: 0x{:x}", cluster_features) << dendl; } if (m->get_type() == MSG_MNVMEOF_GW_MAP) { -- 2.39.5