From d5051c7ea3a75af7296c9a6aadde29229eb288c6 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 30 Oct 2024 16:55:13 +0100 Subject: [PATCH] ApiListener: Log error context only once When logging at the warning level, the logger will automatically look up for registered context and append them to the log entry accordingly. --- lib/remote/apilistener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 7884131c46f..df45679f4c0 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -1552,7 +1552,7 @@ void ApiListener::ReplayLog(const JsonRpcConnection::Ptr& client) count++; } catch (const std::exception& ex) { Log(LogWarning, "ApiListener") - << "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex, false); + << "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << ex.what(); Log(LogDebug, "ApiListener") << "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);