Skip to content

Commit

Permalink
Use nicer status logging in a few more places. (#16962)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored Apr 4, 2022
1 parent 70d614e commit 7a54d58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/app/StatusResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ CHIP_ERROR StatusResponse::ProcessStatusResponse(System::PacketBufferHandle && a
#endif
StatusIB status;
ReturnErrorOnFailure(response.GetStatus(status.mStatus));
ChipLogProgress(InteractionModel, "Received status response, status is %u", to_underlying(status.mStatus));
ChipLogProgress(InteractionModel, "Received status response, status is " ChipLogFormatIMStatus,
ChipLogValueIMStatus(status.mStatus));
ReturnErrorOnFailure(response.ExitContainer());

if (status.mStatus == Protocols::InteractionModel::Status::Success)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ bool emberAfAdministratorCommissioningClusterOpenCommissioningWindowCallback(
{
if (globalStatus != InteractionModel::Status::Success)
{
ChipLogError(Zcl, "Failed to open commissioning window. Global status %d", to_underlying(globalStatus));
ChipLogError(Zcl, "Failed to open commissioning window. Global status " ChipLogFormatIMStatus,
ChipLogValueIMStatus(globalStatus));
}
commandObj->AddStatus(commandPath, globalStatus);
}
Expand Down Expand Up @@ -191,7 +192,8 @@ bool emberAfAdministratorCommissioningClusterOpenBasicCommissioningWindowCallbac
{
if (globalStatus != InteractionModel::Status::Success)
{
ChipLogError(Zcl, "Failed to open commissioning window. Global status %d", to_underlying(globalStatus));
ChipLogError(Zcl, "Failed to open commissioning window. Global status " ChipLogFormatIMStatus,
ChipLogValueIMStatus(globalStatus));
}
commandObj->AddStatus(commandPath, globalStatus);
}
Expand Down

0 comments on commit 7a54d58

Please sign in to comment.