> For the complete documentation index, see [llms.txt](https://docs.bluefletch.com/bluefletch-enterprise/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/sa-6/features/log-collection-and-submission.md).

# Log Collection and Submission

A Support Application 6 feature that collects device logs and uploads them for remote troubleshooting.

## Overview

Log Collection and Submission gathers device and third-party application logs, including OEM diagnostic logger output, and uploads them to Azure Blob Storage and/or Splunk, or hands them off to sibling BlueFletch apps. This allows a help-desk ticket to include real log data without physically retrieving the device.

By default, log-file submission is disabled.

## User Guide

To configure Log Collection and Submission, complete the following steps:

1. Set submitLogs.enabled to true to enable log-file submission.
2. Configure the upload destination: set logUrl for a host URL,loggingConnection and loggingContainer for Azure Blob Storage, or splunkApiLogPath and splunkLogAuth for Splunk log uploads.
3. Optionally enable scheduled uploads by settingsubmitLogs.alarmEnabled to true and configuringsubmitLogs.multipleHoursOfDayToSend.
4. Optionally enable boot-time uploads by settingsubmitLogs.sendOnBoot to true.
5. Configure submitLogs.directories\[] to specify per-app log file globs to collect.
6. If using Zebra RxLogger or Honeywell HxLogger, setrxLogger.loggingDuration to control how long logging stays enabled before auto-revert.

## Configuration

### Enabling Log Submission

To enable log-file submission, set submitLogs.enabled to true:

```json
"bfSupportAgent": {
"submitLogs": {
  "enabled": true
}
}
```

### Configuring the Upload Destination

Set logUrl for a host URL, or loggingConnection andloggingContainer for Azure Blob Storage:

```json
"bfSupportAgent": {
"logUrl": "https://log.example.com/upload",
"loggingConnection": "azure-connection-string",
"loggingContainer": "log-container"
}
```

To upload logs to Splunk, set splunkApiLogPath andsplunkLogAuth:

```json
"bfSupportAgent": {
"splunkApiLogPath": "services/collector/raw",
"splunkLogAuth": "your-splunk-log-token"
}
```

### Configuring Scheduled Uploads

To enable scheduled (alarm-driven) log uploads, setsubmitLogs.alarmEnabled to true and specify the hours to run:

```json
"bfSupportAgent": {
"submitLogs": {
  "enabled": true,
  "alarmEnabled": true,
  "multipleHoursOfDayToSend": "0,6,12,18"
}
}
```

### Configuring Boot-Time Uploads

To upload logs on device boot, set submitLogs.sendOnBoot to true:

```json
"bfSupportAgent": {
"submitLogs": {
  "enabled": true,
  "sendOnBoot": true
}
}
```

### Configuring Log Directories

Set submitLogs.directories\[] to specify per-app log file globs to collect. Each entry includes application, location, files (regex), and an optional extractor (currently only rxloggercsvis supported):

```json
"bfSupportAgent": {
"submitLogs": {
  "enabled": true,
  "directories": [
    {
      "application": "com.example.app",
      "location": "/sdcard/logs/",
      "files": ".*\\.log",
      "extractor": "rxloggercsv"
    }
  ]
}
}
```

### Configuring RxLogger/HxLogger Auto-Revert

Set rxLogger.loggingDuration to the number of minutes RxLogger or HxLogger stays enabled before auto-revert:

```json
"bfSupportAgent": {
"rxLogger": {
"loggingDuration": 30
}
}
```

This table provides the settings for the Log Collection and Submission feature.

| Configuration                       | Type    | Default | Description                                                                                                                                     |
| ----------------------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| logUrl                              | String  | -       | Host URL used when submitting device application logs                                                                                           |
| loggingConnection                   | String  | -       | Azure Blob Storage connection string                                                                                                            |
| loggingContainer                    | String  | -       | Azure Blob Storage container name                                                                                                               |
| splunkApiLogPath                    | String  | -       | Splunk collector path for device log uploads (distinct from the event API path)                                                                 |
| splunkLogAuth                       | String  | -       | Splunk auth token used specifically for log submission                                                                                          |
| rxLogger.loggingDuration            | Integer | -       | Minutes RxLogger/HxLogger stays enabled before auto-revert                                                                                      |
| submitLogs.enabled                  | Boolean | false   | Enables log-file submission                                                                                                                     |
| submitLogs.alarmEnabled             | Boolean | false   | Enables scheduled (alarm-driven) log uploads                                                                                                    |
| submitLogs.sendOnBoot               | Boolean | false   | Upload logs on device boot                                                                                                                      |
| submitLogs.multipleHoursOfDayToSend | String  | -       | Comma-separated hours (0-23, device local time) to run scheduled uploads                                                                        |
| submitLogs.directories\[]           | Array   | -       | Per-app log file globs to collect: `application`, `location`, `files` (regex), optional `extractor` (currently only `rxloggercsv` is supported) |

### Error Handling

| Scenario                                                                                    | Expected behavior                              | Recovery                                                                                                                                         |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| No `logUrl`/Azure/Splunk log destination configured                                         | Zip saved to Downloads folder (`SavedLocally`) | User/technician manually retrieves the file                                                                                                      |
| Network unavailable during upload                                                           | `NetworkFailure` result                        | Re-run submission when connectivity returns; no automatic background retry was found for this specific pipeline (unlike the generic event queue) |
| <p>HTTP error from destination<br>HttpError result<br>Check destination credentials/URL</p> | HttpError `result`                             | Check destination credentials/URL                                                                                                                |

### Logging and Troubleshooting

**Problem: Log submission reports SavedLocally unexpectedly.**

Check:&#x20;

1. Are logUrl, `loggingConnection/loggingContainer`, or the Splunk log fields (`splunkApiLogPath`, `splunkLogAuth`) populated in the effective config?&#x20;
2. If none are set, this is expected behavior, not a bug — the zip will be in the device Downloads folder.

**Problem: RxLogger/HxLogger doesn't stop.**

Check:

1. Is `SCHEDULE_EXACT_ALARM` permission granted (required for `RevertSystemLoggerAlarmReceiver`)?&#x20;
2. Was the logging duration (`rxLogger.loggingDuration`) configured, or left at a default that's longer than expected?

## Putting It All Together

For the example described above, the full configuration for the Log Collection and Submission feature is as follows:

```json
"bfSupportAgent": {
"logUrl": "https://log.example.com/upload",
"loggingConnection": "azure-connection-string",
"loggingContainer": "log-container",
"splunkApiLogPath": "services/collector/raw",
"splunkLogAuth": "your-splunk-log-token",
"rxLogger": {
  "loggingDuration": 30
},
"submitLogs": {
  "enabled": true,
  "alarmEnabled": true,
  "sendOnBoot": false,
  "multipleHoursOfDayToSend": "0,6,12,18",
  "directories": [
    {
      "application": "com.example.app",
      "location": "/sdcard/logs/",
      "files": ".*\\.log",
      "extractor": "rxloggercsv"
    }
  ]
}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/sa-6/features/log-collection-and-submission.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
