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.
This commit is contained in:
Yonas Habteab 2024-10-30 16:55:13 +01:00
parent d5cd5aff2c
commit d5051c7ea3

View File

@ -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);