NRF_LOG “logs dropped (x)”


Introduction to NRF_LOG ( Logger module )

The Logger module provides a log (Log) recording function for the application. It can be used by SDK libraries, or in application code.

The main features of the Logger module include support for different levels of Log messages, including ERROR, WARNING, INFO, and DEBUG, etc. Developers can choose to log appropriate levels of messages in their applications.

In addition, this module also supports the Log formatting function, allowing you to add variable values, strings and other information to the log message.

Why does it show “Logs dropped (x)”

You may encounter "Logs dropped" messages when using the NRF_LOG function. This is usually because the logging system buffer is full, causing some log messages to be discarded.

NRF_LOG has a log buffer of a certain size. If the application generates too many log messages that exceed the size of the buffer, log loss will occur.
Logs dropped

Increasing the buffer size can fix this problem

In any project, find the sdk_config.h file and open it.
Logs dropped
After finding the NRF_LOG_BUFSIZE can be increased to 2048 or larger.
Logs dropped
After saving and recompiling and downloading you should see "Logs dropped (x)" disappear.
Logs dropped