nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ log_rpc_get_crash_log()

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).

Parameters
offsetCrash log offset.
bufferOutput buffer to copy the received log chunk.
buffer_lengthOutput buffer length.
Returns
The number of characters copied into the output buffer.
-errno Indicates failure.