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 Oct 30, 2024
1 parent 92399a9 commit 8574357
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 @@ -1554,7 +1554,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 8574357

Please sign in to comment.