From a83a46d60059a063ec953ba15f4cdcc2b3874440 Mon Sep 17 00:00:00 2001 From: j-berman Date: Fri, 7 Nov 2025 16:00:57 -0800 Subject: Fix logging deadlock --- src/cryptonote_protocol/cryptonote_protocol_handler.inl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 2a6ad658d..1686394c5 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -44,6 +44,7 @@ #include "net/network_throttle-detail.hpp" #include "common/pruning.h" #include "common/util.h" +#include "misc_log_ex.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "net.cn" @@ -55,8 +56,10 @@ const char *cat = "net.p2p.msg"; \ if (ELPP->vRegistry()->allowed(level, cat)) { \ init; \ - if (test) \ - el::base::Writer(level, el::Color::Default, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::NormalLog).construct(cat) << x; \ + if (test) { \ + LOG_TO_STRING(x); \ + el::base::Writer(level, el::Color::Default, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::NormalLog).construct(cat) << str; \ + } \ } \ } while(0) -- cgit v1.2.3