Hi,
Is it possible to enable and Different log level from Zephyr cli using Zephyr Logging API?
i am using
I want to change or register new level using CLI.
Thanks
Hi,
Is it possible to enable and Different log level from Zephyr cli using Zephyr Logging API?
i am using
Hi,
I have in dept studied the zephyr Logging module we can use achieve this using zephyr built in logging Api.
by setting following configuration
CONFIG_LOG_CMDS=y
and config logging immediate/deferred etc.
we can set different logging level.
C:\v1.9.0\zephyr\subsys\logging
Thanks
Hi Waqar, so you were able to achieve this?
Thanks for letting me know, I was certain that this wasn't going to be possible. The LOG statements in Zephyr are preprocessor macros, and reducing the log level for a module will normally ensure that the lower priority log statement don't get compiled into the image at all, so I didn't see how they could be reenabled through the Zephyr shell.
Thanks for sharing!
Best regards,
Raoul Pathak
Hi Raoul,
Thanks.
I have not a get a chance to implement in firmware. May b you are right. I will try it today.
Hi Raoul,
Yes you are right.
Logs can also be compiled in but filtered on run time using dedicate API. Run time filtering is independent for each backend and each source of log messages. Source of log messages can be a module or specific instance of the module.
Hi Waqar, you're completely right. Runtime filtering is fully supported, clearly stated here: https://docs.zephyrproject.org/latest/services/logging/index.html
Though I don't see any references to available shell commands in the docs. Thanks for making me aware, and let me know if you have further issues.
Raoul