2025-12-09 17:51:05 +00:00
---
2026-01-04 14:32:47 +00:00
summary: "Clawdbot logging: rolling diagnostics file log + unified log privacy flags"
2025-12-09 17:51:05 +00:00
read_when:
- Capturing macOS logs or investigating private data logging
2025-12-12 20:46:12 +00:00
- Debugging voice wake/session lifecycle issues
2025-12-09 17:51:05 +00:00
---
2025-12-12 20:46:12 +00:00
# Logging (macOS)
## Rolling diagnostics file log (Debug pane)
2026-01-04 14:32:47 +00:00
Clawdbot routes macOS app logs through swift-log (unified logging by default) and can write a local, rotating file log to disk when you need a durable capture.
2025-12-12 20:46:12 +00:00
2025-12-31 16:03:18 +01:00
- Verbosity: **Debug pane → Logs → App logging → Verbosity**
- Enable: **Debug pane → Logs → App logging → “Write rolling diagnostics log (JSONL)”**
2026-01-04 14:32:47 +00:00
- Location: `~/Library/Logs/Clawdbot/diagnostics.jsonl` (rotates automatically; old files are suffixed with `.1` , `.2` , …)
2025-12-31 16:03:18 +01:00
- Clear: **Debug pane → Logs → App logging → “Clear”**
2025-12-12 20:46:12 +00:00
Notes:
- This is **off by default** . Enable only while actively debugging.
- Treat the file as sensitive; don’ t share it without review.
## Unified logging private data on macOS
2025-12-07 17:35:13 +01:00
Unified logging redacts most payloads unless a subsystem opts into `privacy -off` . Per Peter's write-up on macOS [logging privacy shenanigans ](https://steipete.me/posts/2025/logging-privacy-shenanigans ) (2025) this is controlled by a plist in `/Library/Preferences/Logging/Subsystems/` keyed by the subsystem name. Only new log entries pick up the flag, so enable it before reproducing an issue.
2026-01-04 14:32:47 +00:00
## Enable for Clawdbot (`com.clawdbot`)
2025-12-07 17:35:13 +01:00
- Write the plist to a temp file first, then install it atomically as root:
```bash
2026-01-04 14:32:47 +00:00
cat < < 'EOF' >/tmp/com.clawdbot.plist
2025-12-07 17:35:13 +01:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
< plist version = "1.0" >
< dict >
< key > DEFAULT-OPTIONS< / key >
< dict >
< key > Enable-Private-Data< / key >
< true / >
< / dict >
< / dict >
< / plist >
EOF
2026-01-04 14:32:47 +00:00
sudo install -m 644 -o root -g wheel /tmp/com.clawdbot.plist /Library/Preferences/Logging/Subsystems/com.clawdbot.plist
2025-12-07 17:35:13 +01:00
```
- No reboot is required; logd notices the file quickly, but only new log lines will include private payloads.
- View the richer output with the existing helper, e.g. `./scripts/clawlog.sh --category WebChat --last 5m` .
## Disable after debugging
2026-01-04 14:32:47 +00:00
- Remove the override: `sudo rm /Library/Preferences/Logging/Subsystems/com.clawdbot.plist` .
2025-12-07 17:35:13 +01:00
- Optionally run `sudo log config --reload` to force logd to drop the override immediately.
- Remember this surface can include phone numbers and message bodies; keep the plist in place only while you actively need the extra detail.