macOS Logging: Rolling Diagnostics File Log and Unified Log Privacy Flags

This page explains how to enable and manage the rolling diagnostics log for the macOS OpenClaw application, and how to configure unified logging privacy flags to avoid redacted payloads. It is intended for developers and support personnel troubleshooting OpenClaw on macOS.

Read this when

  • Capturing macOS logs or investigating private data logging
  • Debugging voice wake/session lifecycle issues

Logging (macOS)

Rolling diagnostics file log (Debug pane)

The macOS application uses swift-log for logging, with unified logging enabled by default. It also supports writing to a rotating local file for persistent storage (DiagnosticsFileLog).

  • Turn it on: Go to Debug pane > Logs > App logging and select "Write rolling diagnostics log (JSONL)" (disabled by default).
  • Set the level: Use the Debug pane > Logs > App logging > Verbosity dropdown.
  • Where it lives: ~/Library/Logs/OpenClaw/diagnostics.jsonl.
  • File rotation: Occurs at 5 MB, keeping up to 5 backup files with names ending in .1....5 (the oldest is removed).
  • Erase everything: Click Debug pane > Logs > App logging > "Clear" to remove the current file and all backups.

Treat this file as confidential. Do not share it without first reviewing its contents.

Unified logging private data on macOS

Most payloads in unified logging are redacted unless a subsystem explicitly opts into privacy -off. This is configured through a plist located at /Library/Preferences/Logging/Subsystems/, keyed by subsystem name. The flag only applies to new log entries, so enable it before reproducing the problem. For more context, see macOS logging privacy shenanigans.

Enable for OpenClaw (ai.openclaw)

First write the plist to a temporary file, then atomically install it as root:

cat <<'EOF' >/tmp/ai.openclaw.plist
<?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
sudo install -m 644 -o root -g wheel /tmp/ai.openclaw.plist /Library/Preferences/Logging/Subsystems/ai.openclaw.plist

No system restart is needed; logd picks up the file almost immediately, but only fresh log lines will include private payloads. View the expanded output with ./scripts/clawlog.sh --category WebChat --last 5m (--last/-l controls the time window, default 5m; --category/-c narrows results by category).

Disable after debugging

  • To remove the override: sudo rm /Library/Preferences/Logging/Subsystems/ai.openclaw.plist.
  • Optionally run sudo log config --reload to force logd to discard the override right away.
  • This surface may expose phone numbers and message content. Keep the plist active only while you actually need it.