nRF Cloud Log backend (REST API) not pushing logs to cloud

I'm trying to configure the nRF cloud log backend to aid with debugging of devices during field tests without the need for bulky UART harnesses to capture logs from the serial output of the board. Relevant prj.conf excerpts below:

```
CONFIG_LOG=y
CONFIG_LOG_PROCESS_THREAD=y
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=4096
CONFIG_LOG_BUFFER_SIZE=1024
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=10000
CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=5
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_NRF_CLOUD=y
CONFIG_NRF_CLOUD_REST=y
CONFIG_NRF_CLOUD_REST_AUTOGEN_JWT=y
CONFIG_LOG_BACKEND_NRF_CLOUD_OUTPUT_TEXT=y
CONFIG_NRF_CLOUD_LOG_DIRECT=y
CONFIG_NRF_CLOUD_LOG_BACKEND=y
CONFIG_NRF_CLOUD_LOG_OUTPUT_LEVEL=3
CONFIG_NRF_CLOUD_LOG_LOG_LEVEL_DBG=y
CONFIG_NRF_CLOUD_LOG_BUF_SIZE=1024
CONFIG_LOG_MODE_DEFERRED=y
```

At the very start of main.c, a buffer for REST responses is allocated, and a rest context passed to the cloud log backend:
```

int main(void) {
  boot_write_img_confirmed();
  uint8_t *rx_buf = calloc(2048, sizeof(uint8_t));
  struct nrf_cloud_rest_context ctx = {
      .connect_socket = -1,
      .keep_alive = true,
      .timeout_ms = 10000,
      .auth = NULL,
      .rx_buf = rx_buf,
      .rx_buf_len = 2048,
  };

  nrf_cloud_log_rest_context_set(&ctx, "LOG_TEST");
```

This configuration appears to have some effect, as the format of log lines on the UART output are changed after enabling the cloud log backend, however no data is actually pushed to the cloud for this device. Besides log line format changes, the only indication that the cloud logger is present is occasional debug output between application logs:
`[00:00:24.045,135] <dbg> nrf_cloud_log_backend: logger_notify: Buffered lines:0, bytes:0; logged lines:0, bytes:0; sent lines:0, bytes:0; dropped lines:0`

This is the only message received from the nrf_cloud_log_backend module, and it never indicates any buffered or sent data. I know this device can use the nRF Cloud API, as we're using the LTE location API without issue.

Please let me know how I should adjust our firmware to allow logs to be properly pushed to the cloud
Kaitlyn

Related