8000 Add loogging of nodeID patch by leonardmgh · Pull Request #33 · home-assistant-libs/chip-wheels · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add loogging of nodeID patch #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Add loogging of nodeID patch #33

merged 2 commits into from
Mar 27, 2024

Conversation

leonardmgh
Copy link
@leonardmgh leonardmgh commented Mar 3, 2024

This adds the logging of the node ID for log messages originating from the "ReliableMessageMgr" and "ReliableMessageContext". This hopefully adds more insight into which device communication errors originate from.
The log messages will look like this:
CHIP:EM: Rxd Ack; Removing MessageCounter:56585655 from Retrans Table on exchange 51103r with NodeID 287454020

I have not tested this patch with a real world setup yet, but it passes the sdk tests.

There are more places the NodeID can be logged, but is this nessecarry?

@agners
Copy link
Collaborator
agners commented Mar 4, 2024

Hi @leonardmgh, thanks for your PR!

Adding the node ID to the messages is definitely helpful and welcome! 🙏

We try to keep the patchset over the upstream Matter SDK as small as possible, can you try to upstream this patch as well (create a PR to the upstream project at https://github.com/project-chip/connectedhomeip).

On a different note, some messages do have the node ID (as well as the fabric) logged already, see:
https://github.com/project-chip/connectedhomeip/blob/v1.2.0.1/src/app/OperationalSessionSetup.cpp#L53-L55

Maybe it would be good if the SDK standardizes on a (that?) format? 🤔

@agners agners marked this pull request as ready for review March 4, 2024 14:23
@agners agners marked this pull request as draft March 4, 2024 14:23
@leonardmgh
Copy link
Author

I will make a PR to the Matter SDK, lets see how this goes.

I have modified my implementation to just modify the macro, to keep the footprint of this change smaller and also adopted the log format for the node ID used in the SDK.
project-chip/connectedhomeip@master...leonardmgh:connectedhomeip:logging-nodeid

Im still not sure if that's the way to go or if i should explicit add logging for the node ID everywhere where the macro currently is used.

@agners
Copy link
Collaborator
agners commented Mar 7, 2024

Im still not sure if that's the way to go or if i should explicit add logging for the node ID everywhere where the macro currently is used.

Nah I think this is fine or rather better.

Please share here or tag me when you've created the PR, I'll follow the discussion there too.

@leonardmgh
Copy link
Author

Yes, ill do that. I had a few problems getting all tests integrated into the SDK to run on my machine, so im still working on that.

@agners
Copy link
Collaborator
agners commented Mar 9, 2024

Yes, ill do that. I had a few problems getting all tests integrated into the SDK to run on my machine, so im still working on that.

I do run some tests locally at times to reproduce, but usually rely on their GitHub action CI tests. Running the full test suite they have locally seems a bit too ambitious to me 😅

When you look at PRs and how folks add patches/iterate, I think that is how most developer handle it TBH.

@leonardmgh
Copy link
Author

I have created an PR to the Matter SDK now:
project-chip/connectedhomeip#32550

@leonardmgh
Copy link
Author

@agners the pr has been merged now. Is this PR still relevant or will the release branch soon be updated to use newer version of the matter repo?

@agners
Copy link
Collaborator
agners commented Mar 21, 2024

@leonardmgh adding Node ID to the current builds would still be helpful. Can you update this PR with the patch which got merged (and enable the new config option)? 🥺

@leonardmgh leonardmgh changed the base branch from main to release March 21, 2024 17:09
@leonardmgh
Copy link
Author

Great, i have updated everything now. Im still verifying that everything works locally though. I also discovered that i forgot to add an option in the build system to enable the node Id logging, so i have just included that in the patch for now. I think ill create another PR to add the option to enable it using --arg with GN.

@agners
Copy link
Collaborator
agners commented Mar 21, 2024

FWIW, we already patch the config in other cases (specifically with this patch). So I am fine with also changing the config through patch in this case.

Just mark as ready for review in case you are happy, then I'll merge the change and make a new release.

@leonardmgh leonardmgh marked this pull request as ready for review March 21, 2024 18:06
@leonardmgh
Copy link
Author

Everything works on my machine.
For this patch its probably fine to patch the config, but i think its prettier to enable it using a command line option in the future.

@agners agners merged commit 8c60daa into home-assistant-libs:release Mar 27, 2024
@leonardmgh leonardmgh deleted the add-nodeid-logging branch March 27, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0