Commit 3b1a364
authored
[log] Add debug logging to resolveWasmCacheDir in cmd/flags_logging (#5494)
Adds 3 debug logging calls to `resolveWasmCacheDir` in
`internal/cmd/flags_logging.go` to trace how the WASM compilation cache
directory is resolved at startup.
### Changes
- Log when directory is resolved from the `--wasm-cache-dir` CLI flag
- Log when directory is resolved from the `MCP_GATEWAY_WASM_CACHE_DIR`
environment variable
- Log when directory falls back to the default
(`<log-dir>/wazero-cache`)
### Why This Is Useful
When debugging startup issues or verifying configuration, it's helpful
to know which source (CLI flag, env var, or default) determined the WASM
cache directory. The existing `debugLog` from `root.go` is reused — no
new logger declaration was needed.
Enable via:
```bash
DEBUG=cmd:root ./awmg --config config.toml
```
> Generated by [Go Logger
Enhancement](https://github.com/github/gh-aw-mcpg/actions/runs/25703783871/agentic_workflow)
· ● 6.2M ·
[◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw-mcpg+%22gh-aw-workflow-id%3A+go-logger%22&type=pullrequests)
<!-- gh-aw-agentic-workflow: Go Logger Enhancement, engine: copilot,
version: 1.0.40, model: claude-sonnet-4.6, id: 25703783871, workflow_id:
go-logger, run:
https://github.com/github/gh-aw-mcpg/actions/runs/25703783871 -->
<!-- gh-aw-workflow-id: go-logger -->1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
0 commit comments