diff --git a/config/nrfconnect/app/sample-defaults.conf b/config/nrfconnect/app/sample-defaults.conf index 8ad73904dfb977..7145c2d7b704c9 100644 --- a/config/nrfconnect/app/sample-defaults.conf +++ b/config/nrfconnect/app/sample-defaults.conf @@ -22,6 +22,7 @@ CONFIG_STD_CPP14=y CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=y CONFIG_MATTER_LOG_LEVEL_DBG=y +CONFIG_LOG_DEFAULT_LEVEL=2 CONFIG_PRINTK_SYNC=y CONFIG_ASSERT=y CONFIG_HW_STACK_PROTECTION=y @@ -107,3 +108,12 @@ CONFIG_MBEDTLS_POLY1305_C=n CONFIG_MBEDTLS_CHACHAPOLY_C=n CONFIG_MBEDTLS_GCM_C=n CONFIG_MBEDTLS_RSA_C=n + +# Disable not used shell modules +CONFIG_SENSOR_SHELL=n +CONFIG_DEVICE_SHELL=n +CONFIG_DATE_SHELL=n +CONFIG_DEVMEM_SHELL=n +CONFIG_MCUBOOT_SHELL=n +CONFIG_CLOCK_CONTROL_NRF_SHELL=n +CONFIG_FLASH_SHELL=n diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index e1b593e0f04b6f..bdc434f656a6e2 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -63,8 +63,8 @@ macro(chip_gn_arg_string ARG STRING) string(APPEND CHIP_GN_ARGS "--arg-string\n${ARG}\n${STRING}\n") endmacro() -macro(chip_gn_arg_bool ARG BOOLEAN) - if (${BOOLEAN}) +macro(chip_gn_arg_bool ARG) + if (${ARGN}) string(APPEND CHIP_GN_ARGS "--arg\n${ARG}\ntrue\n") else() string(APPEND CHIP_GN_ARGS "--arg\n${ARG}\nfalse\n") @@ -214,6 +214,10 @@ chip_gn_arg_bool ("chip_build_tests" CONFIG_CHIP_BUILD_TE chip_gn_arg_bool ("chip_monolithic_tests" CONFIG_CHIP_BUILD_TESTS) chip_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS) chip_gn_arg_bool ("chip_build_libshell" CONFIG_CHIP_LIB_SHELL) +chip_gn_arg_bool ("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1) +chip_gn_arg_bool ("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3) +chip_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4) +chip_gn_arg_bool ("chip_automation_logging" "false") if (CONFIG_CHIP_ROTATING_DEVICE_ID) chip_gn_arg_bool("chip_enable_rotating_device_id" "true") diff --git a/examples/lighting-app/nrfconnect/prj.conf b/examples/lighting-app/nrfconnect/prj.conf index 387d0c698da6aa..9851733db5f347 100644 --- a/examples/lighting-app/nrfconnect/prj.conf +++ b/examples/lighting-app/nrfconnect/prj.conf @@ -37,6 +37,7 @@ CONFIG_BT_DEVICE_NAME="MatterLight" # Additional configs for debbugging experience. CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y +CONFIG_RESET_ON_FATAL_ERROR=n # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" diff --git a/examples/lock-app/nrfconnect/prj.conf b/examples/lock-app/nrfconnect/prj.conf index 5a059b5108bc08..dabdbeef761f31 100644 --- a/examples/lock-app/nrfconnect/prj.conf +++ b/examples/lock-app/nrfconnect/prj.conf @@ -38,6 +38,7 @@ CONFIG_BT_DEVICE_NAME="MatterLock" # Additional configs for debbugging experience. CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y +CONFIG_RESET_ON_FATAL_ERROR=n # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index 88d4b7be7808f6..7de40feb570f12 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -183,7 +183,7 @@ CHIP_ERROR EventManagement::CopyToNextBuffer(CircularEventBuffer * apEventBuffer err = writer.Finalize(); SuccessOrExit(err); - ChipLogProgress(EventLogging, "Copy Event to next buffer with priority %u", static_cast(nextBuffer->GetPriority())); + ChipLogDetail(EventLogging, "Copy Event to next buffer with priority %u", static_cast(nextBuffer->GetPriority())); exit: if (err != CHIP_NO_ERROR) { diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 5c2703c484b2ce..12f352e8f2c76c 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -315,7 +315,7 @@ CHIP_ERROR InteractionModelEngine::OnReadInitialRequest(Messaging::ExchangeConte if (aInteractionType == ReadHandler::InteractionType::Subscribe && ((handlerPoolCapacity - GetNumActiveReadHandlers()) == 1) && !HasActiveRead()) { - ChipLogProgress(InteractionModel, "Reserve the last ReadHandler for IM read Interaction"); + ChipLogDetail(InteractionModel, "Reserve the last ReadHandler for IM read Interaction"); aStatus = Protocols::InteractionModel::Status::ResourceExhausted; return CHIP_NO_ERROR; } @@ -474,8 +474,8 @@ CHIP_ERROR InteractionModelEngine::OnMessageReceived(Messaging::ExchangeContext void InteractionModelEngine::OnResponseTimeout(Messaging::ExchangeContext * ec) { - ChipLogProgress(InteractionModel, "Time out! Failed to receive IM response from Exchange: " ChipLogFormatExchange, - ChipLogValueExchange(ec)); + ChipLogError(InteractionModel, "Time out! Failed to receive IM response from Exchange: " ChipLogFormatExchange, + ChipLogValueExchange(ec)); } void InteractionModelEngine::AddReadClient(ReadClient * apReadClient) diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 4966a71c93d131..c30dac9849b06c 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -553,8 +553,8 @@ CHIP_ERROR ReadClient::ProcessReportData(System::PacketBufferHandle && aPayload) void ReadClient::OnResponseTimeout(Messaging::ExchangeContext * apExchangeContext) { - ChipLogProgress(DataManagement, "Time out! failed to receive report data from Exchange: " ChipLogFormatExchange, - ChipLogValueExchange(apExchangeContext)); + ChipLogError(DataManagement, "Time out! failed to receive report data from Exchange: " ChipLogFormatExchange, + ChipLogValueExchange(apExchangeContext)); Close(CHIP_ERROR_TIMEOUT); } @@ -888,7 +888,7 @@ bool ReadClient::ResubscribeIfNeeded() uint32_t intervalMsec = 0; if (mReadPrepareParams.mResubscribePolicy == nullptr) { - ChipLogProgress(DataManagement, "mResubscribePolicy is null"); + ChipLogDetail(DataManagement, "mResubscribePolicy is null"); return false; } mReadPrepareParams.mResubscribePolicy(mNumRetries, intervalMsec, shouldResubscribe); @@ -901,7 +901,7 @@ bool ReadClient::ResubscribeIfNeeded() System::Clock::Milliseconds32(intervalMsec), OnResubscribeTimerCallback, this); if (err != CHIP_NO_ERROR) { - ChipLogProgress(DataManagement, "Fail to resubscribe with error %" CHIP_ERROR_FORMAT, err.Format()); + ChipLogError(DataManagement, "Fail to resubscribe with error %" CHIP_ERROR_FORMAT, err.Format()); return false; } diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 0ef94fd1f80706..09f008f683bb2b 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -290,8 +290,8 @@ CHIP_ERROR ReadHandler::OnUnknownMsgType(Messaging::ExchangeContext * apExchange void ReadHandler::OnResponseTimeout(Messaging::ExchangeContext * apExchangeContext) { - ChipLogProgress(DataManagement, "Time out! failed to receive status response from Exchange: " ChipLogFormatExchange, - ChipLogValueExchange(apExchangeContext)); + ChipLogError(DataManagement, "Time out! failed to receive status response from Exchange: " ChipLogFormatExchange, + ChipLogValueExchange(apExchangeContext)); Close(); } @@ -706,7 +706,7 @@ void ReadHandler::OnUnblockHoldReportCallback(System::Layer * apSystemLayer, voi { VerifyOrReturn(apAppState != nullptr); ReadHandler * readHandler = static_cast(apAppState); - ChipLogProgress(DataManagement, "Unblock report hold after min %d seconds", readHandler->mMinIntervalFloorSeconds); + ChipLogDetail(DataManagement, "Unblock report hold after min %d seconds", readHandler->mMinIntervalFloorSeconds); readHandler->mHoldReport = false; if (readHandler->mDirty) { @@ -722,14 +722,14 @@ void ReadHandler::OnRefreshSubscribeTimerSyncCallback(System::Layer * apSystemLa VerifyOrReturn(apAppState != nullptr); ReadHandler * readHandler = static_cast(apAppState); readHandler->mHoldSync = false; - ChipLogProgress(DataManagement, "Refresh subscribe timer sync after %d seconds", - readHandler->mMaxIntervalCeilingSeconds - readHandler->mMinIntervalFloorSeconds); + ChipLogDetail(DataManagement, "Refresh subscribe timer sync after %d seconds", + readHandler->mMaxIntervalCeilingSeconds - readHandler->mMinIntervalFloorSeconds); InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); } CHIP_ERROR ReadHandler::RefreshSubscribeSyncTimer() { - ChipLogProgress(DataManagement, "Refresh Subscribe Sync Timer with max %d seconds", mMaxIntervalCeilingSeconds); + ChipLogDetail(DataManagement, "Refresh Subscribe Sync Timer with max %d seconds", mMaxIntervalCeilingSeconds); InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( OnUnblockHoldReportCallback, this); InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index e8f3490b896142..56969167c8ca63 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -498,8 +498,8 @@ CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchang void WriteClient::OnResponseTimeout(Messaging::ExchangeContext * apExchangeContext) { - ChipLogProgress(DataManagement, "Time out! failed to receive write response from Exchange: " ChipLogFormatExchange, - ChipLogValueExchange(apExchangeContext)); + ChipLogError(DataManagement, "Time out! failed to receive write response from Exchange: " ChipLogFormatExchange, + ChipLogValueExchange(apExchangeContext)); if (mpCallback != nullptr) { diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index 5377b3512ab818..26b3492652279c 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -163,8 +163,8 @@ CHIP_ERROR WriteHandler::OnMessageReceived(Messaging::ExchangeContext * apExchan void WriteHandler::OnResponseTimeout(Messaging::ExchangeContext * apExchangeContext) { - ChipLogProgress(DataManagement, "Time out! failed to receive status response from Exchange: " ChipLogFormatExchange, - ChipLogValueExchange(apExchangeContext)); + ChipLogError(DataManagement, "Time out! failed to receive status response from Exchange: " ChipLogFormatExchange, + ChipLogValueExchange(apExchangeContext)); Close(); } diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index d8b7e589356620..a46e1246195cc2 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -52,7 +52,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - ChipLogProgress(DeviceLayer, "emberAfExternalAttributeReadCallback endpoint %d ", endpointIndex); + ChipLogDetail(DeviceLayer, "emberAfExternalAttributeReadCallback endpoint %d ", endpointIndex); EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE; @@ -70,7 +70,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - ChipLogProgress(DeviceLayer, "emberAfExternalAttributeWriteCallback endpoint %d ", endpointIndex); + ChipLogDetail(DeviceLayer, "emberAfExternalAttributeWriteCallback endpoint %d ", endpointIndex); EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE; @@ -124,7 +124,7 @@ EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointTy } else if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS) { - ChipLogProgress(DeviceLayer, "Adding ContentApp error=%d", ret); + ChipLogError(DeviceLayer, "Adding ContentApp error=%d", ret); return kNoCurrentEndpointId; } // Handle wrap condition @@ -136,7 +136,7 @@ EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointTy } index++; } - ChipLogProgress(DeviceLayer, "Failed to add dynamic endpoint: No endpoints available!"); + ChipLogError(DeviceLayer, "Failed to add dynamic endpoint: No endpoints available!"); return kNoCurrentEndpointId; } @@ -168,7 +168,7 @@ EndpointId ContentAppPlatform::RemoveContentApp(ContentApp * app) void ContentAppPlatform::SetupAppPlatform() { - ChipLogProgress(DeviceLayer, "AppPlatform::SetupAppPlatform()"); + ChipLogDetail(DeviceLayer, "AppPlatform::SetupAppPlatform()"); // Clear out the device database uint8_t index = 0; @@ -189,8 +189,8 @@ void ContentAppPlatform::SetupAppPlatform() mCurrentEndpointId = emberAfFixedEndpointCount(); } - ChipLogProgress(DeviceLayer, "emberAfFixedEndpointCount()=%d mCurrentEndpointId=%d", emberAfFixedEndpointCount(), - mCurrentEndpointId); + ChipLogDetail(DeviceLayer, "emberAfFixedEndpointCount()=%d mCurrentEndpointId=%d", emberAfFixedEndpointCount(), + mCurrentEndpointId); // Disable last fixed endpoint, which is used as a placeholder for all of the // supported clusters so that ZAP will generated the requisite code. @@ -238,8 +238,8 @@ ContentApp * ContentAppPlatform::LoadContentAppByClient(uint16_t vendorId, uint1 CHIP_ERROR err = mContentAppFactory->LookupCatalogVendorApp(vendorId, productId, &vendorApp); if (err != CHIP_NO_ERROR) { - ChipLogProgress(DeviceLayer, "GetLoadContentAppByVendorId() - failed to find an app for vendorId %d, productId %d", - vendorId, productId); + ChipLogError(DeviceLayer, "GetLoadContentAppByVendorId() - failed to find an app for vendorId %d, productId %d", vendorId, + productId); return nullptr; } return LoadContentAppInternal(&vendorApp); @@ -255,8 +255,8 @@ ContentApp * ContentAppPlatform::LoadContentApp(const CatalogVendorApp & vendorA CHIP_ERROR err = mContentAppFactory->ConvertToPlatformCatalogVendorApp(vendorApp, &destinationApp); if (err != CHIP_NO_ERROR) { - ChipLogProgress(DeviceLayer, "GetLoadContentApp() - failed to find an app for catalog vendorId %d, appId %s", - vendorApp.catalogVendorId, vendorApp.applicationId); + ChipLogError(DeviceLayer, "GetLoadContentApp() - failed to find an app for catalog vendorId %d, appId %s", + vendorApp.catalogVendorId, vendorApp.applicationId); return nullptr; } return LoadContentAppInternal(&destinationApp); @@ -272,8 +272,8 @@ ContentApp * ContentAppPlatform::GetContentApp(const CatalogVendorApp & vendorAp CHIP_ERROR err = mContentAppFactory->ConvertToPlatformCatalogVendorApp(vendorApp, &destinationApp); if (err != CHIP_NO_ERROR) { - ChipLogProgress(DeviceLayer, "GetContentApp() - failed to find an app for catalog vendorId %d, appId %s", - vendorApp.catalogVendorId, vendorApp.applicationId); + ChipLogError(DeviceLayer, "GetContentApp() - failed to find an app for catalog vendorId %d, appId %s", + vendorApp.catalogVendorId, vendorApp.applicationId); return nullptr; } return GetContentAppInternal(&destinationApp); diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index ac4b1fce548cf8..98103b494e8a38 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -233,7 +233,7 @@ void AddBindingEntry(const EmberBindingTableEntry & entry) if (err != CHIP_NO_ERROR) { // Unicast connection failure can happen if peer is offline. We'll retry connection on-demand. - ChipLogProgress( + ChipLogError( Zcl, "Binding: Failed to create session for unicast binding to device " ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT, ChipLogValueX64(entry.nodeId), err.Format()); } diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index 834f855b69d7b0..8608c1f99a9748 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -189,7 +189,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega // Gets called when any network interface on the Node is updated. void OnNetworkInfoChanged() override { - ChipLogProgress(Zcl, "GeneralDiagnosticsDelegate: OnNetworkInfoChanged"); + ChipLogDetail(Zcl, "GeneralDiagnosticsDelegate: OnNetworkInfoChanged"); ReportAttributeOnAllEndpoints(GeneralDiagnostics::Attributes::NetworkInterfaces::Id); } @@ -197,7 +197,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega // Gets called when the device has been rebooted. void OnDeviceRebooted(chip::DeviceLayer::BootReasonType bootReason) override { - ChipLogProgress(Zcl, "GeneralDiagnosticsDelegate: OnDeviceRebooted"); + ChipLogDetail(Zcl, "GeneralDiagnosticsDelegate: OnDeviceRebooted"); ReportAttributeOnAllEndpoints(GeneralDiagnostics::Attributes::BootReasons::Id); @@ -217,7 +217,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega void OnHardwareFaultsDetected(GeneralFaults & previous, GeneralFaults & current) override { - ChipLogProgress(Zcl, "GeneralDiagnosticsDelegate: OnHardwareFaultsDetected"); + ChipLogDetail(Zcl, "GeneralDiagnosticsDelegate: OnHardwareFaultsDetected"); for (auto endpointId : EnabledEndpointsWithServerCluster(GeneralDiagnostics::Id)) { @@ -243,7 +243,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega // Get called when the Node detects a radio fault has been raised. void OnRadioFaultsDetected(GeneralFaults & previous, GeneralFaults & current) override { - ChipLogProgress(Zcl, "GeneralDiagnosticsDelegate: OnHardwareFaultsDetected"); + ChipLogDetail(Zcl, "GeneralDiagnosticsDelegate: OnRadioFaultsDetected"); for (auto endpointId : EnabledEndpointsWithServerCluster(GeneralDiagnostics::Id)) { @@ -269,7 +269,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega // Get called when the Node detects a network fault has been raised. void OnNetworkFaultsDetected(GeneralFaults & previous, GeneralFaults & current) override { - ChipLogProgress(Zcl, "GeneralDiagnosticsDelegate: OnHardwareFaultsDetected"); + ChipLogDetail(Zcl, "GeneralDiagnosticsDelegate: OnNetworkFaultsDetected"); for (auto endpointId : EnabledEndpointsWithServerCluster(GeneralDiagnostics::Id)) { diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp index 62f0f3a8b18704..b320cf361fa7b3 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp @@ -130,7 +130,7 @@ class SoftwareDiagnosticsDelegate : public DeviceLayer::SoftwareDiagnosticsDeleg // Gets called when a software fault that has taken place on the Node. void OnSoftwareFaultDetected(SoftwareDiagnostics::Structs::SoftwareFaultStruct::Type & softwareFault) override { - ChipLogProgress(Zcl, "SoftwareDiagnosticsDelegate: OnSoftwareFaultDetected"); + ChipLogDetail(Zcl, "SoftwareDiagnosticsDelegate: OnSoftwareFaultDetected"); for (auto endpoint : EnabledEndpointsWithServerCluster(SoftwareDiagnostics::Id)) { diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 557f6f185ae5d7..c807783dbb47c3 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -728,8 +728,8 @@ CHIP_ERROR Engine::ScheduleBufferPressureEventDelivery(uint32_t aBytesWritten) GetMinEventLogPosition(minEventLogPosition); if (aBytesWritten - minEventLogPosition > CHIP_CONFIG_EVENT_LOGGING_BYTE_THRESHOLD) { - ChipLogProgress(DataManagement, " Buffer overfilled CHIP_CONFIG_EVENT_LOGGING_BYTE_THRESHOLD %d, schedule engine run", - CHIP_CONFIG_EVENT_LOGGING_BYTE_THRESHOLD); + ChipLogDetail(DataManagement, " Buffer overfilled CHIP_CONFIG_EVENT_LOGGING_BYTE_THRESHOLD %d, schedule engine run", + CHIP_CONFIG_EVENT_LOGGING_BYTE_THRESHOLD); return ScheduleRun(); } return CHIP_NO_ERROR; diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index e544b43e99ba7e..59cefa261346da 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -325,7 +325,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi uint32_t val32; if (DeviceLayer::ConfigurationMgr().GetVendorId(value) != CHIP_NO_ERROR) { - ChipLogProgress(Discovery, "Vendor ID not known"); + ChipLogDetail(Discovery, "Vendor ID not known"); } else { @@ -334,7 +334,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi if (DeviceLayer::ConfigurationMgr().GetProductId(value) != CHIP_NO_ERROR) { - ChipLogProgress(Discovery, "Product ID not known"); + ChipLogDetail(Discovery, "Product ID not known"); } else { @@ -382,7 +382,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi { if (DeviceLayer::ConfigurationMgr().GetInitialPairingHint(value) != CHIP_NO_ERROR) { - ChipLogProgress(Discovery, "DNS-SD Pairing Hint not set"); + ChipLogDetail(Discovery, "DNS-SD Pairing Hint not set"); } else { @@ -391,7 +391,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi if (DeviceLayer::ConfigurationMgr().GetInitialPairingInstruction(pairingInst, sizeof(pairingInst)) != CHIP_NO_ERROR) { - ChipLogProgress(Discovery, "DNS-SD Pairing Instruction not set"); + ChipLogDetail(Discovery, "DNS-SD Pairing Instruction not set"); } else { @@ -402,7 +402,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi { if (DeviceLayer::ConfigurationMgr().GetSecondaryPairingHint(value) != CHIP_NO_ERROR) { - ChipLogProgress(Discovery, "DNS-SD Pairing Hint not set"); + ChipLogDetail(Discovery, "DNS-SD Pairing Hint not set"); } else { @@ -411,7 +411,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi if (DeviceLayer::ConfigurationMgr().GetSecondaryPairingInstruction(pairingInst, sizeof(pairingInst)) != CHIP_NO_ERROR) { - ChipLogProgress(Discovery, "DNS-SD Pairing Instruction not set"); + ChipLogDetail(Discovery, "DNS-SD Pairing Instruction not set"); } else { diff --git a/src/app/server/OnboardingCodesUtil.cpp b/src/app/server/OnboardingCodesUtil.cpp index 41bd12d15d23e2..9cfd99999f7e62 100644 --- a/src/app/server/OnboardingCodesUtil.cpp +++ b/src/app/server/OnboardingCodesUtil.cpp @@ -42,7 +42,7 @@ void PrintOnboardingCodes(chip::RendezvousInformationFlags aRendezvousFlags) CHIP_ERROR err = GetSetupPayload(payload, aRendezvousFlags); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "GetSetupPayload() failed: %s", chip::ErrorStr(err)); + ChipLogError(AppServer, "GetSetupPayload() failed: %s", chip::ErrorStr(err)); } PrintOnboardingCodes(payload); @@ -101,8 +101,7 @@ CHIP_ERROR GetSetupPayload(chip::SetupPayload & aSetupPayload, chip::RendezvousI err = GetCommissionableDataProvider()->GetSetupPasscode(aSetupPayload.setUpPINCode); if (err != CHIP_NO_ERROR) { - ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupPasscode() failed: %s", - chip::ErrorStr(err)); + ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupPasscode() failed: %s", chip::ErrorStr(err)); #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE) && CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE ChipLogProgress(AppServer, "*** Using default EXAMPLE passcode %u ***", static_cast(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE)); @@ -115,22 +114,21 @@ CHIP_ERROR GetSetupPayload(chip::SetupPayload & aSetupPayload, chip::RendezvousI err = GetCommissionableDataProvider()->GetSetupDiscriminator(aSetupPayload.discriminator); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "GetCommissionableDataProvider()->GetSetupDiscriminator() failed: %s", - chip::ErrorStr(err)); + ChipLogError(AppServer, "GetCommissionableDataProvider()->GetSetupDiscriminator() failed: %s", chip::ErrorStr(err)); return err; } err = ConfigurationMgr().GetVendorId(aSetupPayload.vendorID); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "ConfigurationMgr().GetVendorId() failed: %s", chip::ErrorStr(err)); + ChipLogError(AppServer, "ConfigurationMgr().GetVendorId() failed: %s", chip::ErrorStr(err)); return err; } err = ConfigurationMgr().GetProductId(aSetupPayload.productID); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "ConfigurationMgr().GetProductId() failed: %s", chip::ErrorStr(err)); + ChipLogError(AppServer, "ConfigurationMgr().GetProductId() failed: %s", chip::ErrorStr(err)); return err; } @@ -144,7 +142,7 @@ CHIP_ERROR GetQRCode(std::string & aQRCode, chip::RendezvousInformationFlags aRe CHIP_ERROR err = GetSetupPayload(payload, aRendezvousFlags); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "GetSetupPayload() failed: %s", chip::ErrorStr(err)); + ChipLogError(AppServer, "GetSetupPayload() failed: %s", chip::ErrorStr(err)); return err; } @@ -158,7 +156,7 @@ CHIP_ERROR GetQRCode(std::string & aQRCode, const chip::SetupPayload & payload) CHIP_ERROR err = chip::QRCodeSetupPayloadGenerator(payload).payloadBase38Representation(aQRCode); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "Generating QR Code failed: %s", chip::ErrorStr(err)); + ChipLogError(AppServer, "Generating QR Code failed: %s", chip::ErrorStr(err)); return err; } @@ -186,7 +184,7 @@ CHIP_ERROR GetManualPairingCode(std::string & aManualPairingCode, chip::Rendezvo CHIP_ERROR err = GetSetupPayload(payload, aRendezvousFlags); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "GetSetupPayload() failed: %s", chip::ErrorStr(err)); + ChipLogError(AppServer, "GetSetupPayload() failed: %s", chip::ErrorStr(err)); return err; } return GetManualPairingCode(aManualPairingCode, payload); @@ -197,7 +195,7 @@ CHIP_ERROR GetManualPairingCode(std::string & aManualPairingCode, const chip::Se CHIP_ERROR err = chip::ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(aManualPairingCode); if (err != CHIP_NO_ERROR) { - ChipLogProgress(AppServer, "Generating Manual Pairing Code failed: %s", chip::ErrorStr(err)); + ChipLogError(AppServer, "Generating Manual Pairing Code failed: %s", chip::ErrorStr(err)); return err; } diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp index 61814944d1fbfc..89fea684bee9ce 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp +++ b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp @@ -175,7 +175,7 @@ void GenericPlatformManagerImpl_Zephyr::_RunEventLoop(void) template void GenericPlatformManagerImpl_Zephyr::EventLoopTaskMain(void * thisPtr, void *, void *) { - ChipLogDetail(DeviceLayer, "CHIP task running"); + ChipLogProgress(DeviceLayer, "CHIP task running"); static_cast *>(thisPtr)->Impl()->RunEventLoop(); } diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index d68b07ac436671..eee9518c930fb5 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -445,7 +445,7 @@ void DiscoveryImplPlatform::HandleDnssdPublish(void * context, const char * type } else { - ChipLogProgress(Discovery, "mDNS service published error: %s", chip::ErrorStr(error)); + ChipLogError(Discovery, "mDNS service published error: %s", chip::ErrorStr(error)); } } diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index ffbfa33d1fb185..090075f1c6aa8b 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -750,7 +750,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_GetAndLogThread otNeighborInfo neighborInfo[TELEM_NEIGHBOR_TABLE_SIZE]; otNeighborInfoIterator iter; otNeighborInfoIterator iterCopy; - char printBuf[TELEM_PRINT_BUFFER_SIZE] = {0}; + char printBuf[TELEM_PRINT_BUFFER_SIZE] = { 0 }; uint16_t rloc16; uint16_t routerId; uint16_t leaderRouterId; @@ -1889,7 +1889,7 @@ void GenericThreadStackManagerImpl_OpenThread::OnSrpClientNotificatio switch (aError) { case OT_ERROR_NONE: { - ChipLogProgress(DeviceLayer, "OnSrpClientNotification: Last requested operation completed successfully"); + ChipLogDetail(DeviceLayer, "OnSrpClientNotification: Last requested operation completed successfully"); if (aHostInfo) { diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index 1734adeb3c43d3..a244b915555f28 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -448,7 +448,7 @@ CHIP_ERROR BLEManagerImpl::HandleGAPConnect(const ChipDeviceEvent * event) } else { - ChipLogProgress(DeviceLayer, "BLE connection failed (reason: 0x%02" PRIx16 ")", connEvent->HciResult); + ChipLogError(DeviceLayer, "BLE connection failed (reason: 0x%02" PRIx16 ")", connEvent->HciResult); } ChipLogProgress(DeviceLayer, "Current number of connections: %" PRIu16 "/%" PRIu16, NumConnections(), CONFIG_BT_MAX_CONN); diff --git a/src/platform/Zephyr/NFCManagerImpl.cpp b/src/platform/Zephyr/NFCManagerImpl.cpp index cfbf6f4e292881..d1a89be3e3fdf8 100644 --- a/src/platform/Zephyr/NFCManagerImpl.cpp +++ b/src/platform/Zephyr/NFCManagerImpl.cpp @@ -81,7 +81,7 @@ CHIP_ERROR NFCManagerImpl::_StartTagEmulation(const char * payload, size_t paylo exit: if (error != CHIP_NO_ERROR) - ChipLogProgress(DeviceLayer, "Starting NFC Tag emulation failed: %s", chip::ErrorStr(error)); + ChipLogError(DeviceLayer, "Starting NFC Tag emulation failed: %s", chip::ErrorStr(error)); return error; } diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp index 275e63da08cff6..e54362a100a19b 100644 --- a/src/protocols/secure_channel/CASEServer.cpp +++ b/src/protocols/secure_channel/CASEServer.cpp @@ -114,7 +114,7 @@ void CASEServer::Cleanup() void CASEServer::OnSessionEstablishmentError(CHIP_ERROR err) { - ChipLogProgress(Inet, "CASE Session establishment failed: %s", ErrorStr(err)); + ChipLogError(Inet, "CASE Session establishment failed: %s", ErrorStr(err)); mSessionIDAllocator.Free(mSessionKeyId); Cleanup(); } diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index bc4dd71514e201..abda82f306563f 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -387,7 +387,7 @@ CHIP_ERROR CASESession::SendSigma1() mState = kSentSigma1; - ChipLogDetail(SecureChannel, "Sent Sigma1 msg"); + ChipLogProgress(SecureChannel, "Sent Sigma1 msg"); mDelegate->OnSessionEstablishmentStarted(); @@ -412,7 +412,7 @@ CHIP_ERROR CASESession::HandleSigma1(System::PacketBufferHandle && msg) ByteSpan destinationIdentifier; ByteSpan initiatorRandom; - ChipLogDetail(SecureChannel, "Received Sigma1 msg"); + ChipLogProgress(SecureChannel, "Received Sigma1 msg"); bool sessionResumptionRequested = false; ByteSpan resumptionId; @@ -657,7 +657,7 @@ CHIP_ERROR CASESession::SendSigma2() mState = kSentSigma2; - ChipLogDetail(SecureChannel, "Sent Sigma2 msg"); + ChipLogProgress(SecureChannel, "Sent Sigma2 msg"); return CHIP_NO_ERROR; } @@ -775,7 +775,7 @@ CHIP_ERROR CASESession::HandleSigma2(System::PacketBufferHandle && msg) VerifyOrExit(buf != nullptr, err = CHIP_ERROR_MESSAGE_INCOMPLETE); - ChipLogDetail(SecureChannel, "Received Sigma2 msg"); + ChipLogProgress(SecureChannel, "Received Sigma2 msg"); tlvReader.Init(std::move(msg)); SuccessOrExit(err = tlvReader.Next(containerType, TLV::AnonymousTag())); @@ -1015,7 +1015,7 @@ CHIP_ERROR CASESession::SendSigma3() SendFlags(SendMessageFlags::kExpectResponse)); SuccessOrExit(err); - ChipLogDetail(SecureChannel, "Sent Sigma3 msg"); + ChipLogProgress(SecureChannel, "Sent Sigma3 msg"); err = mCommissioningHash.Finish(messageDigestSpan); SuccessOrExit(err); @@ -1064,7 +1064,7 @@ CHIP_ERROR CASESession::HandleSigma3(System::PacketBufferHandle && msg) uint32_t decodeTagIdSeq = 0; - ChipLogDetail(SecureChannel, "Received Sigma3 msg"); + ChipLogProgress(SecureChannel, "Received Sigma3 msg"); tlvReader.Init(std::move(msg)); SuccessOrExit(err = tlvReader.Next(containerType, TLV::AnonymousTag())); diff --git a/src/system/SystemPacketBuffer.cpp b/src/system/SystemPacketBuffer.cpp index 4ff2c68fe02a82..55fd5fe593338e 100644 --- a/src/system/SystemPacketBuffer.cpp +++ b/src/system/SystemPacketBuffer.cpp @@ -170,7 +170,7 @@ void PacketBufferHandle::InternalRightSize() { mBuffer = lNewPacket; SYSTEM_STATS_UPDATE_LWIP_PBUF_COUNTS(); - ChipLogProgress(chipSystemLayer, "PacketBuffer: RightSize Copied"); + ChipLogDetail(chipSystemLayer, "PacketBuffer: RightSize Copied"); } }