-
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
[logging] Introduced log modules and categories selection #130
base: master
Are you sure you want to change the base?
Conversation
…hip#24137) This will let us avoid generating incorrect backwards-compat shims for things that get added after our big API update but have a name that includes acronyms.
Adds ability to remove APIs in Darwin codegen.
* Remove the MfgSpecificPing command from Darwin API. Except for the backwards-compat shims, of course. The template refactorings are to reduce repetition and to enable handling for removal and renaming of commands. * Fix darwin-framework-tool compile.
Pulls in Darwin old name information.
…ject-chip#24163) project-chip#23409 changed the key under which we store group fabric info, which breaks reception of group messages if a node updates from before that change to after that change. We should just keep using the same key name, especially because sharing a single storage key for all possible fabric lists (groups and whatever else will want to store lists of fabric indices) does not necessarily make sense. Fixes project-chip#24161
7bb2b55
to
44473e2
Compare
44473e2
to
05a5b7f
Compare
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.
Looking good, but note that there are tons of code like:
#if CHIP_DETAIL_LOGGING
...
which will not take advantage of the possibility to override enabled category for a given module. It's fine with me for now, but just saying.
@@ -63,6 +63,169 @@ enum LogModule | |||
kLogModule_Max | |||
}; | |||
|
|||
/* Log modules enablers. Those definitions can be overwritten with 0 to disable |
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.
Are these still needed? IsModuleCategoryEnabled
allows one to effectively disable any module, right?
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.
Yeah, but you would need to do that by defining all possible log categories for this module 0. Actually I just realized that in the same way we can disable global log categories and nobody uses _CHIP_USE_LOGGING, which is quite weird for me.
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, but it would simplify the configuration architecture. At least I think these macros should be taken into account in IsModuleCategoryEnabled
so that one can easily cut off the code for log generation.
Ehh that will affect only case if |
05a5b7f
to
2b26342
Compare
6e86e27
to
b22a0c5
Compare
* BLE bringup on the CCP board * Restyle the PR
* Align naming in Identify cluster XML with the spec. * Update ZAP files to the new naming. * Regenerate generated files.
It's 4-5x faster for me this way. Also sets ZAP_SKIP_REAL_VERSION so that once project-chip/zap#876 merges we stop messing with the ZAP repo just to run it.
* [Telink] Update Telink Docker image (Zephyr update) * [Telink] update ZEPHYR_REVISION
* Make it work on Darwin. * Pay attention to the wifi/thread command-line flags. * Ensure we always have a sane network commissioning cluster set up (falling back to the Ethernet one if nothing else is enabled). Fixes project-chip#23987
…p#24166) Don't rely on d2i_X509 object reuse and fix double-free The chip-cert tool is relying on OpenSSL's "object reuse" mode in d2i_X509. d2i_X509 has a very bizarre type signature: X509 *d2i_X509(X509 **out, const unsigned char **inp, long len); The safest way to call this function is to pass NULL into out. The function then straightforwardly hands you a new X509 on success, or NULL on error. However, if out and *out are both NULL, OpenSSL tries to reuse the existing X509 object. This does not work, particular not in the way that chip-cert uses it. When d2i_X509 fails, even in this mode, it will free what's at *out and set *out to NULL. So when ReadCert's d2i_X509 call fails, it will silently free the cert parameter. But the caller doesn't know this and will double-free it!
Put Kconfig definitions shared between nRF Connect and Telink platforms in the common Zephyr's Kconfig. Group and reorder the config variables for easier search. Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Damian Krolik <[email protected]>
…ackgrounding the app on iOS (project-chip#24046) * tv-casting-app: Making getDiscoveredCommissioner API synchronous * iOS MatterTvCastingBridge: Generate spake2pSalt (and verifier) if required in CommissionableDataProviderImpl * tv-casting-app/darwin: Stopping/restarting Matter server when app becomes inactive/active. Also, disabling BLE * Addressing cliffamzn@'s feedback
Currently it is possible to disable some part of logs based on their level, but not on their origin module (region). After introducing specific log modules selection it would be convenient to make controlling those modules log categories possible as well. Summary of changes: * Added definitions for every existing log module that are by default set to 1, but can be ovewritten to 0. * Introduced IsModuleCategoryEnabled macro that returns category state (0/1) for specific log module. * To avoid creating dozens of new definitions for every module-category combination, IsModuleCategoryEnabled macro by default returns corresponding global category value (CHIP_DETAIL/PROGRESS/ERROR/AUTOMATION_LOGGING). If any category value was defined for specific module, it is used instead of global one. * Added filtering based on the mentioned definitions, so ChipInternalLog and ChipInternalLogByteSpan has definitions provided only if corresponding origin module is enabled and the specific category for this module is enabled. nRFConnect: * Disabled some modules for nrfconnect platform that saved ~11,8k of flash. * Switched from using kconfig value to filer out logs levels to relying on Matter logging layer filtering in Zephyr logging implementation.
3b728ce
to
c8403cb
Compare
3c1103d
to
2b8b8df
Compare
Currently it is possible to disable some part of logs based on their level, but not on their origin module (region). After
introducing specific log modules selection it would be convenient to make controlling those modules log categories
possible as well.
Summary of changes:
by default returns corresponding global category value (CHIP_DETAIL/PROGRESS/ERROR/AUTOMATION_LOGGING). If any
category value was defined for specific module, it is used instead of global one.
provided only if corresponding origin module is enabled and the specific category for this module is enabled.