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

What is logger message pool?

What is the logger message pool? There are two main definitions for it: 

  • NRF_LOG_MSGPOOL_ELEMENT_COUNT
  • NRF_LOG_MSGPOOL_ELEMENT_SIZE

However it is not clear what it is used for?

Parents Reply
  • Sorry. It seems I had misunderstood how this works.

    This is what I recently found out:

    Whenever you log something, it is put in a buffer, of size NRF_LOG_BUFSIZE. This is part of the the "log frontend".

    Either at a later point (deferred logging) or right away (not deferred logging), the log entry is processed. During processing, the log entry is fetched out of the buffer and provided for the log backend for actually getting sent somewhere as a line of text. This is where the memory pool is used, for sending the log entry from the log frontend to the log backend. NRF_LOG_MSGPOOL_ELEMENT_COUNT and NRF_LOG_MSGPOOL_ELEMENT_SIZE is for configuring the memory pool.

    Regards,
    Terje

Children
Related