This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Storing nrf_log output (NRF_LOG_INFO) in internal file system .

Hi,

I am beginner in nordic development. I will be using using FreeRTOS with nordic ( if that matters).

Requirement: I need to store logs in internal file system.

Device - nrf52840 DK,

SDK - nRF5_SDK_15.3.0

I understand that nrf_log output is limited to backends - UART/RTT/CLI, But I want to log into a file in internal file system.

Please tell if more details are required.

Parents Reply
  • Hi,

    nrf_log_backend_flush() is called from nrf_log_frontend_dequeue(), which is defined to NRF_LOG_INTERNAL_PROCESS(), which is called from NRF_LOG_INTERNAL_FLUSH(). This in turn is called from NRF_LOG_FLUSH() or NRF_LOG_INTERNAL_FINAL_FLUSH(). nrf_log_backend_flush() is not called from anywhere else.

    The purpose of nrf_log_backend_flush() is to make the backend drop log messages in case they are not processed in time. The backend can simply use an empty implementation if this is not relevant (as is the case for most of the log backends in the SDK).

Children
No Data
Related