nRF Connect SDK API 2.8.99
|
int log_rpc_get_crash_log | ( | size_t | offset, |
char * | buffer, | ||
size_t | buffer_length ) |
#include <include/logging/log_rpc.h>
Retrieves the crash log retained on the remote device.
The function issues an nRF RPC command to obtain the last crash log retained on the remote device, and then it copies the received log chunk into the specified buffer.
The remote may either send the entire crash log in one go, if it fits within the output buffer, or it may send a chunk of the log. Therefore, the caller should repeatedly call this function, with an increasing offset, until it returns 0 (indicating no more data), or a negative value (indicated an error).
offset | Crash log offset. |
buffer | Output buffer to copy the received log chunk. |
buffer_length | Output buffer length. |