From f213acfef617384ac3b6b1a8e6058aa7192638a4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 20 Jul 2022 15:41:10 -0400 Subject: [PATCH] Add nodeid to logs in OperationalDeviceProxy.cpp --- src/app/OperationalDeviceProxy.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/OperationalDeviceProxy.cpp b/src/app/OperationalDeviceProxy.cpp index 33373f79996a88..a23751c8fc84cc 100644 --- a/src/app/OperationalDeviceProxy.cpp +++ b/src/app/OperationalDeviceProxy.cpp @@ -169,7 +169,8 @@ void OperationalDeviceProxy::UpdateDeviceData(const Transport::PeerAddress & add char peerAddrBuff[Transport::PeerAddress::kMaxToStringSize]; addr.ToString(peerAddrBuff); - ChipLogDetail(Controller, "Updating device address to %s while in state %d", peerAddrBuff, static_cast(mState)); + ChipLogDetail(Controller, "Updating device address to %s while in state %d on node 0x" ChipLogFormatX64, peerAddrBuff, + static_cast(mState), ChipLogValueX64(GetDeviceId())); #endif CHIP_ERROR err = CHIP_NO_ERROR; @@ -366,7 +367,9 @@ OperationalDeviceProxy::~OperationalDeviceProxy() { if (mAddressLookupHandle.IsActive()) { - ChipLogProgress(Discovery, "Cancelling incomplete address resolution as device is being deleted."); + ChipLogProgress(Discovery, + "Cancelling incomplete address resolution as device is being deleted for node 0x" ChipLogFormatX64, + ChipLogValueX64(GetDeviceId())); // Skip cancel callback since the destructor is being called, so we assume that this object is // obviously not used anymore @@ -391,7 +394,9 @@ CHIP_ERROR OperationalDeviceProxy::LookupPeerAddress() // MoveToState calls in this method. if (mAddressLookupHandle.IsActive()) { - ChipLogProgress(Discovery, "Operational node lookup already in progress. Will NOT start a new one."); + ChipLogProgress(Discovery, + "Operational node lookup for 0x" ChipLogFormatX64 " already in progress. Will NOT start a new one.", + ChipLogValueX64(GetDeviceId())); return CHIP_NO_ERROR; }