介绍 OpenClaw 的调试方法和日志查看技巧,帮助排查问题和优化性能。
掌握调试技巧,快速定位和解决 OpenClaw 使用中的问题。
# 实时查看日志
openclaw logs -f
# 查看最近100行
openclaw logs --tail 100
# 启用调试模式
openclaw run my-agent --debug
openclaw doctor
在 openclaw.yaml 中设置:
logLevel: debug # 或 info, warn, error
使用 `openclaw logs -f` 命令可以实时跟随查看日志。
使用 `openclaw logs --tail 100` 查看最近 100 行日志。
在运行命令后添加 `--debug` 参数,例如 `openclaw run my-agent --debug`。
运行 `openclaw doctor` 命令来诊断配置状态。
在 `openclaw.yaml` 配置文件中设置 `logLevel` 字段。
人类专家验证
官方机器人验证