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

Problems Printing Buffer Using NRF_LOG_INFO

It looks like NRF_LOG_INFO doesn't copy the data that is sent to it as per the below example. Is there a way around this so that I can reuse long buffers that contain either data arrays or these longer log messages?

    char tempBuff[100] = {"Some string or buffer that I want to print out"};
    NRF_LOG_INFO("%s", tempBuff);
    sprintf(tempBuff, "The second long string or buffer that I want to print so I can debug");
    NRF_LOG_INFO("%s", tempBuff);

Related