Skip to content

Commit

Permalink
Remove unnecessary error log from CurrentFabricRemover (#33896)
Browse files Browse the repository at this point in the history
* Remove unnecessary error log from CurrentFabricRemover

Currently, when the CurrentFabricRemover is successful it logs the
following error with err log level:

Remove Current Fabric Result : src/controller/CurrentFabricRemover.cpp:133: Success

Get rid of the message if successful, it is confusing.

* Add braces to if statement
  • Loading branch information
agners authored and pull[bot] committed Aug 29, 2024
1 parent c0e7814 commit 4949455
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controller/CurrentFabricRemover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ void CurrentFabricRemover::OnCommandFailure(void * context, CHIP_ERROR err)

void CurrentFabricRemover::FinishRemoveCurrentFabric(void * context, CHIP_ERROR err)
{
ChipLogError(Controller, "Remove Current Fabric Result : %" CHIP_ERROR_FORMAT, err.Format());
if (err != CHIP_NO_ERROR)
{
ChipLogError(Controller, "Remove Current Fabric Failed : %" CHIP_ERROR_FORMAT, err.Format());
}
auto * self = static_cast<CurrentFabricRemover *>(context);
self->mNextStep = Step::kAcceptRemoveFabricStart;
if (self->mCurrentFabricRemoveCallback != nullptr)
Expand Down

0 comments on commit 4949455

Please sign in to comment.