Files
nexus/wiki/concepts/Log-Driven-Debugging.md
2026-04-23 04:02:48 +08:00

1.1 KiB
Raw Blame History

title, type, last_updated
title type last_updated
Log-Driven Debugging concept 2026-04-10

Definition

Log-Driven Debugging 是一种通过系统日志定位问题根因的调试方法,尤其适用于分布式系统和多层配置架构。当错误信息具有误导性时,日志是最直接的系统状态反映。

Key Insight

日志真的有用Gateway 日志把问题写得明明白白,只是我自己没仔细看。

OpenClaw Gateway Log Example

provider=custom-api-deepseek-reasoner/deepseek-reasoner ctx=16000
estimatedPromptTokens=393 overflowTokens=392 reserveTokens=16384

这条日志直接揭示了:

  1. 当前模型已被切换为 deepseek-reasoner
  2. 模型 context window 为 16K
  3. Safeguard 预留 16K tokens 导致 overflow

Sources