Diagnostics Flags
Diagnostics Flags
Section titled “Diagnostics Flags”Diagnostics flags let you enable targeted debug logs without turning on verbose logging everywhere. Flags are opt-in and have no effect unless a subsystem checks them.
How it works
Section titled “How it works”- Flags are strings (case-insensitive).
- You can enable flags in config or via an env override.
- Wildcards are supported:
telegram.*matchestelegram.http*enables all flags
Enable via config
Section titled “Enable via config”{ "diagnostics": { "flags": ["telegram.http"] }}Multiple flags:
{ "diagnostics": { "flags": ["telegram.http", "gateway.*"] }}Restart the gateway after changing flags.
Env override (one-off)
Section titled “Env override (one-off)”CODERCLAW_DIAGNOSTICS=telegram.http,telegram.payloadDisable all flags:
CODERCLAW_DIAGNOSTICS=0Where logs go
Section titled “Where logs go”Flags emit logs into the standard diagnostics log file. By default:
/tmp/coderclaw/coderclaw-YYYY-MM-DD.logIf you set logging.file, use that path instead. Logs are JSONL (one JSON object per line). Redaction still applies based on logging.redactSensitive.
Extract logs
Section titled “Extract logs”Pick the latest log file:
ls -t /tmp/coderclaw/coderclaw-*.log | head -n 1Filter for Telegram HTTP diagnostics:
rg "telegram http error" /tmp/coderclaw/coderclaw-*.logOr tail while reproducing:
tail -f /tmp/coderclaw/coderclaw-$(date +%F).log | rg "telegram http error"For remote gateways, you can also use coderclaw logs --follow (see /cli/logs).
- If
logging.levelis set higher thanwarn, these logs may be suppressed. Defaultinfois fine. - Flags are safe to leave enabled; they only affect log volume for the specific subsystem.
- Use /logging to change log destinations, levels, and redaction.