From 9244a248fb15af0f272e11881a3959a734df047f Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 13 Jun 2024 11:05:15 +0200 Subject: [PATCH] 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. --- src/controller/CurrentFabricRemover.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controller/CurrentFabricRemover.cpp b/src/controller/CurrentFabricRemover.cpp index be89731b24d6ba..fa5585cbea1df6 100644 --- a/src/controller/CurrentFabricRemover.cpp +++ b/src/controller/CurrentFabricRemover.cpp @@ -145,7 +145,8 @@ 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(context); self->mNextStep = Step::kAcceptRemoveFabricStart; if (self->mCurrentFabricRemoveCallback != nullptr)