Skip to content

Commit a862cb4

Browse files
eivindj-nordicrlubos
authored andcommitted
lib: nrf_modem_lib: Use debug logs of expected errnos on backend write
We use -ENOSPC and -ENOSPC to signal from the backend that there is no space in backend or it is not properly connected. This can occur from time to time and is not always an error. Though, it can be noisy in log output. This commit replaces the error logs with debug level and adds a hint that the backend should be properly connected. Signed-off-by: Eivind Jølsgard <[email protected]>
1 parent fbec239 commit a862cb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/nrf_modem_lib/nrf_modem_lib_trace.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ static int trace_fragment_write(struct nrf_modem_trace_data *frag)
261261
}
262262

263263
if (ret < 0) {
264-
if (ret != -ENOSPC) {
264+
if ((ret == -ENOSPC) || (ret == -ENOSR)) {
265+
LOG_DBG("trace_backend.write returned with %d", ret);
266+
LOG_DBG("Please make sure that the backend is properly connected.");
267+
} else {
265268
LOG_ERR("trace_backend.write failed with err: %d", ret);
266269
}
267270

0 commit comments

Comments
 (0)