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

NRF_LOG_* and overflow

What causes NRF_LOG to report 'overflow'? The buffer I provide is certainly large enough. 

I have #define NRF_LOG_DEFERRED 1 

What happens if I have something like this? (The method byteToHex() takes an array of bytes and converts them to a HEX string  (2 digits per byte) with a space between each HEX element. This means the size of the buffer2 has to be 3*(size of byte array) + 1.

            memset(buffer2, 0, 512);
            NRF_LOG_DEBUG("=====> Sending data: %s\r\n", nrf_log_push(byteToHex((unsigned char *)global_indicate.data, buffer2, " ",
                (unsigned long)global_indicate.data_length)));
            NRF_LOG_PROCESS();

I am hoping for an immediate rendering so the buffer is emptied. These are situations where the NRF_LOG_PROCESS() in the main loop will not get called before another NRF_LOG_* is called.

In some cases log statements are simply skipped, but I can see from the peer central that the code has been called.

Is there a different behavior of NRF_LOG when soft device is disabled?

Parents Reply Children
No Data
Related