Skip to content

Commit b6b9485

Browse files
authored
Remove unnecessary error log from CurrentFabricRemover (#33896)
* 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
1 parent 907abf2 commit b6b9485

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/controller/CurrentFabricRemover.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ void CurrentFabricRemover::OnCommandFailure(void * context, CHIP_ERROR err)
145145

146146
void CurrentFabricRemover::FinishRemoveCurrentFabric(void * context, CHIP_ERROR err)
147147
{
148-
ChipLogError(Controller, "Remove Current Fabric Result : %" CHIP_ERROR_FORMAT, err.Format());
148+
if (err != CHIP_NO_ERROR)
149+
{
150+
ChipLogError(Controller, "Remove Current Fabric Failed : %" CHIP_ERROR_FORMAT, err.Format());
151+
}
149152
auto * self = static_cast<CurrentFabricRemover *>(context);
150153
self->mNextStep = Step::kAcceptRemoveFabricStart;
151154
if (self->mCurrentFabricRemoveCallback != nullptr)

0 commit comments

Comments
 (0)