nRF Cloud Log backend doesn't filter unwanted messages generated as a side effect of sending other log messages

Hi!

We use nRF Cloud Log backend in our project. And during my research I found that it actually doesn't filter (despite the filtering code is there) messages generated by underlying libs when application log messages are sent to the cloud. This creates an endless stream of messages being sent to the cloud, even if the application is no longer logging messages.

It seems, I see a confirmation for this issue in the code. Here logger_init() is called, it sets up filtering by calling log_filter_set(..., 0) for every source that needs to be filtered out, and then log_backend_enable() is called which actually resets filtering by calling log_filter_set(..., level) for all sources registered in the logger.

My SDK version is 2.9.0. But I see that this code hasn't been changed since that version.

My configuration contains:
CONFIG_LOG_RUNTIME_FILTERING=y
CONFIG_NRF_CLOUD_LOG_BACKEND=y
# This option leads to sending endless messages like this "Sent lines:516, bytes:70952"
CONFIG_NRF_CLOUD_LOG_LOG_LEVEL_INF=y

 

This issue is currently not critical for our project.

Thank you!

Parents Reply
  • Hi Ruslan,

    I have discussed your reported issue with our developers. 
    We have checked internally that nRF Cloud Multi Service sample using CoAP does allow to filter the information. However, it is not very responsive (as it takes around 120 seconds to change the filter value). The filtering happens on the device through device shadow. The cloud sends the filter state to the device (c2d) and the device aligns the cloud logging to that. You need to look at how this is implemented in multi_service sample and implement it in your project.

    Best regards,
    Dejan

Children
No Data
Related