Skip to content

Commit b8a9edf

Browse files
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 8a1d9ae commit b8a9edf

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,11 @@ 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) {
265265
LOG_ERR("trace_backend.write failed with err: %d", ret);
266+
} else {
267+
LOG_DBG("trace_backend.write returned with %d", ret);
268+
LOG_DBG("Is the backend properly connected?");
266269
}
267270

268271
return ret;

0 commit comments

Comments
 (0)