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

Implementing my own NRF_LOG backend.

Hi,

I am beginner in nordic development.

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.

So I was implementing my own backend which uses fatfs to store log in file. I want it to be asynchronous. As nrf_log has option to defer the logging. I wanted to ask if ring_buf is already implemented in frontend or is specific to backend?

Or I have to use implement my own ring buffer (circular queue) which is enqueued during .put and dequeued during flush?

Any guidance will be helpful thanks for your help.

Parents Reply Children
  • Yes I have gone through the nrf_log documentation. I know that nordic provides option to log to flash but for my use-case I want to store logs into a file with daily or hourly rotation functionality. As far I have understood from the flash backend implementation, it writes to a memory location instead of using a file system (eg. fatfs).

    I don't have much experience with embedded but I know a bit. Always happy to learn something.

Related