> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wuji.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Log Export

> Export a log support bundle with wuji logs and send it to support to pinpoint device issues

When a device misbehaves and you need technical support, run `wuji logs export` to package the Wuji logs and diagnostics on your machine into one ZIP support bundle and send it to support.

## Export and Send a Support Bundle

```bash theme={null}
wuji logs export                     # Export the last day of logs
wuji logs export --days 7            # Cover the last seven days
wuji logs export -o support.zip      # Choose the output file
```

By default the bundle is written as a timestamped `wuji-logs-*.zip` in the current directory. Send it to support together with a description of the problem — what happened, when, and the device serial number.

| Option | Description |
| - | - |
| `--days <n>` | Export logs from the last n days, default 1 |
| `--source <sources>` | Filter text logs by source — `sdk`, `studio`, or `stderr`, comma-separated, default all |
| `--with-dump` | Include `device_*.bin` device communication dumps (raw binary) |
| `-o, --output <path>` | Output file path |

The bundle contains:

* **Text logs**: the software logs in the selected range
* **Host and device diagnostics**: a host snapshot, health check results, and per-device diagnostic snapshots with flash history (separated by serial number)
* **Hand model calibration recordings**: calibration recordings in the same date range
* **manifest.json**: the file list and summary of this export

Everything above is included by default, with no extra flag.

`wuji logs export` exports hand model calibration recordings that use the current or historical format and preserves each recording's `manifest.json` file unchanged.

Text logs are redacted before packaging — usernames, hostnames, and other personal information — while device serial numbers and firmware versions are kept so support can trace the problem. Communication dumps included by `--with-dump` and device-side diagnostic data are packaged as-is. Calibration `.mcap` files hold raw motion data.

If the range contains no log files, the export still completes and the summary shows `Logs: skipped (no log files exported)`. If device diagnostics, log export, calibration recording export, device snapshot collection, or Flash log collection fails, the command still creates the bundle when possible. The command exits with code 1 and marks each failure in the summary.

## Collect a Device Diagnostic Snapshot

When only device-side diagnostics are needed and a full log bundle is not, run `wuji logs dump`. It currently supports Wuji Hand 2, with more device types to follow. It captures device identity, fault and status, bus voltage and temperature, communication diagnostics, and Flash KV history:

```bash theme={null}
wuji logs dump                       # scan and collect from every device
wuji logs dump --sn <SN>             # a single device
wuji logs dump -o /tmp/dump          # write to a specific directory
```

| Option | Description |
| - | - |
| `--sn <SN>` | Target a device by serial number |
| `--address <address>` | Target a device by address |
| `--handedness <left\|right>` | Target a device by handedness |
| `-o, --output <directory>` | Output directory path |

Each device produces `<sn>_<timestamp>_device.json` (snapshot) and `<sn>_<timestamp>_flash.jsonl` (flash history). A single field that fails to collect does not abort the run — the reason lands in the snapshot's `failures` list. A missing or offline tactile module is skipped and does not count as a failure. A model query error for an online tactile finger does count as a failure. The command exits with code 1 when any device fails, when a snapshot contains field-collection failures, or when the flash history is missing, and errors out when no device turns up. In scan mode a device type that does not support dump is recorded as skipped rather than failed, while targeting one explicitly records it as failed.

## View the Log Directory

```bash theme={null}
wuji logs path
```

Shows the log directory path, `~/.wuji/logs` by default. The SDK and other components write their runtime logs here.

## List Log Files

```bash theme={null}
wuji logs list                       # List all log files
wuji logs list --days 7              # Only the last seven days
wuji logs list --source sdk,studio   # Filter by source
```

| Option | Description |
| - | - |
| `--days <n>` | List logs from the last n days, default all |
| `--source <sources>` | Filter by source, same values as `wuji logs export` |

## Structured Output

All four subcommands support the global `--json` (pretty JSON) and `--jsonl` (one compact JSON object per line) flags for script parsing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.