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

nRF Log Files

Hi

I want to use loggers in the program. I understand that the code itself uses NRF_LOG. But I do not understand where those log details are printed. So, how do I create custom logs and save to some file?

Thanks in advance.

Parents
  • Hello,

    That depends on what the backend for the log is set to. Search for "NRF_LOG_BACKEND" in sdk_config.h. There are two possible defines there. UART or RTT, and they are set to either 0 or 1. Which one is set to 1? 

    If it is UART, it should be printed over the UART, which is picked up by the programming chip on the DK, and you can view it using e.g. Termite, or Putty.

    If it is RTT, then you can use JLink RTT Viewer.

    If it is RTT and you are using Segger Embedded Studio, then you can view the log while you are debugging in your IDE.

    If you can't find any Backend defines in sdk_config.h, what project/examples are you using?

    Best regards,

    Edvin

Reply
  • Hello,

    That depends on what the backend for the log is set to. Search for "NRF_LOG_BACKEND" in sdk_config.h. There are two possible defines there. UART or RTT, and they are set to either 0 or 1. Which one is set to 1? 

    If it is UART, it should be printed over the UART, which is picked up by the programming chip on the DK, and you can view it using e.g. Termite, or Putty.

    If it is RTT, then you can use JLink RTT Viewer.

    If it is RTT and you are using Segger Embedded Studio, then you can view the log while you are debugging in your IDE.

    If you can't find any Backend defines in sdk_config.h, what project/examples are you using?

    Best regards,

    Edvin

Children
Related