-
Notifications
You must be signed in to change notification settings - Fork 0
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
Introduction to Diagnostic Logs provider #11
Conversation
61243be
to
e54c2be
Compare
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
0b09596
to
d1e65d8
Compare
2be0176
to
d371fb7
Compare
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.h
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.h
Outdated
Show resolved
Hide resolved
@@ -127,6 +127,10 @@ Matter | |||
In |NCS| Matter samples, the default reaction to migration failure is a factory reset of the device. | |||
To change the default reaction, set the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_FACTORY_RESET_ON_KEY_MIGRATION_FAILURE` Kconfig option to ``n``. | |||
|
|||
* Diagnostic logs provider that collects the diagnostic logs that come from the end user, network stack, or system crashes, and sends them to the Matter controller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I'm not sure if we need a docs changes at this stage, because this component is going to evolve and the docs will be likely changed as well. Nevertheless if we really want to do that, it would be good to mention, that network stack or end user logs are not yet supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as the network stack and end user parts come before the next release, I'm fine with leaving the entry as is. If there's any chance that one or both might not make it, then I suggest changing the entry to:
* Diagnostic logs provider that collects the diagnostic logs that come from the end user, network stack, or system crashes, and sends them to the Matter controller. | |
* Diagnostic logs provider that collects the diagnostic logs and sends them to the Matter controller. | |
The current implementation collects logs from system crashes. |
This entry can then be updated when the other parts are added, with the final expected addition changing "current implementation" to "the provider" to remove the implication that the functionality will be further expanded.
b32b77e
to
156e9a9
Compare
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.h
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.cpp
Outdated
Show resolved
Hide resolved
samples/matter/common/src/diagnostic/diagnostic_logs_provider.h
Outdated
Show resolved
Hide resolved
156e9a9
to
0888203
Compare
0888203
to
590b751
Compare
VerifyOrExit(CHIP_NO_ERROR == err, ); | ||
|
||
exit: | ||
outBuffer.reduce_size(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do that in case of success? I think we don't want to set size to 0 in other case than err != CHIP_NO_ERROR
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot to push the recent changes
@@ -39,3 +39,19 @@ config NCS_SAMPLE_MATTER_FACTORY_RESET_ON_KEY_MIGRATION_FAILURE | |||
help | |||
Allow device to perform factory reset if the operational key for Fabric has not been migrated | |||
properly to PSA ITS storage. | |||
|
|||
config NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fair to not enable it by default, but I think we should enable it for door lock in its prj.conf/Kconfig, as we are going to test it during TE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, enabling it by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean enabling it for door lock in its prj.conf/Kconfig not for all samples 😄 Nvm, we can merge it as is, because it's only for the test event purposes.
590b751
to
a38f90a
Compare
VerifyOrExit(CHIP_NO_ERROR == err, ); | ||
|
||
err = EndLogCollection(sessionHandle); | ||
VerifyOrExit(CHIP_NO_ERROR == err, ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's redundant, as we go to exit in the next line anyway.
a38f90a
to
5f1a61b
Compare
Moved finite map implementation from bridge_util to common util to make it available for all samples. Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
5f1a61b
to
b2e9b80
Compare
{ | ||
} | ||
|
||
/* Not movable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant if this class shall be movable (it it supports move semantics) and if not we can explicitly delete move assign operator and move constructor to be consistent with the "copy" part :) (the comment about copyable was fine)
b2e9b80
to
eb78bc8
Compare
This commit introduces the diagnostics logs provider and adds new Kconfigs to manage it. Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
added CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS=y to lock prj.conf Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
eb78bc8
to
deac664
Compare
No description provided.