Runtime Filtering of Log Levels Not Working Properly #72818
Labels
area: Logging
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Bug Found: Issue with Runtime Log Level Filtering in Zephyr
Description: I've encountered an issue regarding the runtime filtering of log levels in Zephyr. Despite configuring the project with
LOG_MODULE_REGISTER(MONITOR)
and attempting to set the log filter using api:
log_filter_set(NULL, 0, log_source_id_get(STRINGIFY(MONITOR)), LOG_LEVEL_WRN),
I've noticed that the filtering doesn't apply as expected when the backend parameter is set to null for the module.
Project Configuration Summary:
• 12 frontends and 1 backend are utilized.
• Runtime filtering is enabled with
CONFIG_LOG_RUNTIME_FILTERING=y.
• UART backend is disabled with
CONFIG_LOG_BACKEND_UART=n.
Expected Behavior: Setting the log level filter using log_filter_set at runtime should effectively control the log output for the specified module.
Actual Behavior: Despite configuring the requested log level here in above eg:
LOG_LEVEL_WRN
using log_filter_set, the filtering doesn't function as anticipated when the backend parameter is set to null.Steps to Reproduce:
1. Configure the project as described above.
2. Attempt to set log filtering using log_filter_set at runtime.
3. Observe that the filtering does not behave as expected when the backend parameter is null.
I kindly request assistance in resolving this issue. Thank you.
The text was updated successfully, but these errors were encountered: