Skip to content

Commit

Permalink
ApiListener: Log error context only once
Browse files Browse the repository at this point in the history
When logging at the warning level, the logger will automatically look up
for registered context and append them to the log entry accordingly.
  • Loading branch information
yhabteab committed Nov 14, 2024
1 parent d5cd5af commit d5051c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/remote/apilistener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d5051c7

Please sign in to comment.