From 13fdafa73e9e98f985ecd8f3debf0cf92b6f4af6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 11 Dec 2024 22:10:50 +0100 Subject: [PATCH] fix: Clamp Event string --- src/WriterPipeline.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WriterPipeline.h b/src/WriterPipeline.h index 22f92e8..9ad00e1 100644 --- a/src/WriterPipeline.h +++ b/src/WriterPipeline.h @@ -72,7 +72,10 @@ struct WriterPipeline { try { parseAndVerifyEvent(m.eventJson, secpCtx, verifyMsg, verifyTime, packedStr, jsonStr); } catch (std::exception &e) { - if (verboseReject) LW << "Rejected event: " << m.eventJson.get_string().substr(0,200) << " reason: " << e.what(); + if (verboseReject) { + jsonStr = tao::json::to_string(m.eventJson).substr(0,200); + LW << "Rejected event: " << jsonStr << " reason: " << e.what(); + } numLive--; totalRejected++; continue;