Skip to content

Commit

Permalink
Add more info when API execution fails (sonic-net#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik authored and Shuotian Cheng committed Nov 7, 2016
1 parent 160d796 commit fd88f12
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,12 @@ sai_status_t processEvent(swss::ConsumerTable &consumer)
}
else if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("failed to execute api: %s: %d", op.c_str(), status);
SWSS_LOG_ERROR("failed to execute api: %s, key: %s, status: %s", op.c_str(), key.c_str(), sai_serialize_status(status).c_str());

for (const auto&v: values)
{
SWSS_LOG_ERROR(" field: %s, value: %s", fvField(v).c_str(), fvValue(v).c_str());
}

exit_and_notify(EXIT_FAILURE);
}
Expand Down

0 comments on commit fd88f12

Please sign in to comment.