From bcc449a5cba183c7358ab48ed4f2140bb1a3238c Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Wed, 3 Jun 2026 14:55:52 +0900 Subject: chore(bin/up): DEBUG=1 writes LLM debug logs to /app/logging (host: logging/) Add a DEBUG=1 convenience flag to bin/up that turns on full LLM debug logging (DISPATCH_DEBUG_LLM) plus the per-step usage/cache split (DISPATCH_DEBUG_USAGE) and routes the JSON request/response files into the container's /app/logging, which maps to the project-root logging/ dir on the host via the existing .:/app bind mount. This makes it easy to verify cache hits (including the prompt-cache warming replay) without docker exec. - bin/up: DEBUG=1 sets DISPATCH_DEBUG_LLM/_USAGE=1 and DISPATCH_DEBUG_LLM_DIR= /app/logging as DEFAULTS (explicit DISPATCH_DEBUG_* still win). Pre-creates the host log dir; /app/* targets are already host-owned so no sudo chown, while the /tmp fallback keeps its ownership fix. - docker-compose.yml: forward DISPATCH_DEBUG_LLM_DIR into the api container. - .gitignore: ignore logging/. --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index aedd0f2..4dd914d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,11 @@ services: DISPATCH_DEBUG_LLM: ${DISPATCH_DEBUG_LLM:-} DISPATCH_DEBUG_LLM_VERBOSITY: ${DISPATCH_DEBUG_LLM_VERBOSITY:-} DISPATCH_DEBUG_USAGE: ${DISPATCH_DEBUG_USAGE:-} + # Where the debug logger writes its JSON files INSIDE the container. + # `DEBUG=1 bin/up` sets this to /app/logging, which maps to the + # gitignored `logging/` dir on the host via the `.:/app` bind mount. + # Empty ⇒ the logger falls back to /tmp/dispatch/llm-debug. + DISPATCH_DEBUG_LLM_DIR: ${DISPATCH_DEBUG_LLM_DIR:-} frontend: build: -- cgit v1.2.3