Skip to content

Commit

Permalink
lib: nrf_modem_lib: Use debug logs of expected errnos on backend write
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
eivindj-nordic committed Jan 9, 2025
1 parent 8a1d9ae commit 5439000
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/nrf_modem_lib/nrf_modem_lib_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,11 @@ static int trace_fragment_write(struct nrf_modem_trace_data *frag)
}

if (ret < 0) {
if (ret != -ENOSPC) {
if ((ret != -ENOSPC) && (ret != -ENOSR)) {
LOG_ERR("trace_backend.write failed with err: %d", ret);
} else {
LOG_DBG("trace_backend.write returned with %d", ret);
LOG_DBG("Is the backend properly connected?");
}

return ret;
Expand Down

0 comments on commit 5439000

Please sign in to comment.