Getting Clearer Logs in OpenClaw for macOS
We’ve all been there. You are trying to fix a bug that only shows up when you aren’t looking. You check the logs, but they are either too thin or filled with <private> placeholders that hide the very data you need to see.
I find that getting the right level of detail is the fastest way to stop guessing and start fixing. Here is how I set up OpenClaw logs on macOS to get the full picture.
What You’ll Need
Section titled “What You’ll Need”- OpenClaw installed on macOS.
- Terminal access with sudo privileges.
Quick Start
Section titled “Quick Start”1. Enable Rolling File Logs
Section titled “1. Enable Rolling File Logs”By default, OpenClaw routes logs through the macOS unified logging system. If you need a durable file on your disk, you can turn on the rolling diagnostics log.
- Go to Debug pane → Logs → App logging → Verbosity and set your level.
- Check the box for “Write rolling diagnostics log (JSONL)”.
- Find your logs at
~/Library/Logs/OpenClaw/diagnostics.jsonl.
The app rotates these files automatically. Old logs get a suffix like .1 or .2. I suggest keeping this off unless you are actively debugging, as these files can get large and contain sensitive data.
2. Unmask Private Data
Section titled “2. Unmask Private Data”macOS unified logging often hides payloads to protect privacy. To see the actual data for the bot.molt subsystem, you need to install a specific configuration profile.
Run this in your terminal to create and install the necessary plist:
cat <<'EOF' >/tmp/bot.molt.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>EOFsudo install -m 644 -o root -g wheel /tmp/bot.molt.plist /Library/Preferences/Logging/Subsystems/bot.molt.plistYou don’t need to reboot. The system picks up the change quickly. You can then view the detailed output using the helper script:
./scripts/clawlog.sh --category WebChat --last 5mTroubleshooting
Section titled “Troubleshooting”I still see <private> in my logs
Section titled “I still see <private> in my logs”The logging system only applies the “privacy -off” flag to new log entries. If you still see redacted data, make sure you installed the plist before you started the process you are trying to debug.
How do I stop the logging?
Section titled “How do I stop the logging?”When you are done, I recommend removing the override to keep your system logs clean and private. Run these commands:
- Remove the file:
sudo rm /Library/Preferences/Logging/Subsystems/bot.molt.plist - Force a reload:
sudo log config --reload - Clear the app logs in the UI: Debug pane → Logs → App logging → “Clear”
Need more help with your setup? Check out the AI Setup Assistant.
What’s Next
Section titled “What’s Next”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.