日志
OpenClaw 日志系统。
查看日志
bash
# 跟踪实时日志
openclaw logs --follow
# 显示最近 N 行
openclaw logs --limit 500
# JSON 格式
openclaw logs --json日志位置
文件日志
/tmp/openclaw/openclaw-*.log服务日志
macOS (launchd):
bash
# 最近日志
cat ~/Library/Logs/openclaw/gateway.log
# 或使用 Console.appLinux (systemd):
bash
journalctl --user -u openclaw -f日志级别
error- 错误warn- 警告info- 信息debug- 调试
详细日志
启用详细日志:
bash
openclaw gateway --verboseWebSocket 日志:
bash
openclaw gateway --ws-log full
openclaw gateway --ws-log compact通道日志
查看特定通道日志:
bash
openclaw channels logs --channel whatsapp
openclaw channels logs --channel telegram --lines 100日志轮转
日志文件会自动轮转。旧日志位于:
/tmp/openclaw/openclaw-*.log.1
/tmp/openclaw/openclaw-*.log.2调试
调试时可以启用原始流日志:
bash
openclaw gateway --raw-stream --raw-stream-path /tmp/raw.log