Commit 267904a
authored
[log] Add debug logging to cmd/proxy (#4134)
Adds 5 new `logProxyCmd` debug log calls to `internal/cmd/proxy.go` to
improve troubleshooting of the `awmg proxy` subcommand.
## Changes
**`internal/cmd/proxy.go`** — reuses the existing `logProxyCmd =
logger.New("cmd:proxy")` logger:
- Log proxy server creation parameters before `proxy.New` (guard path,
policy presence, DIFC mode, trusted bot/user counts)
- Log successful proxy server creation
- Log HTTP server creation with TLS state
- Log when TLS configuration is applied to the HTTP server
- Log entry to `configureTLSTrustEnvironment` (CA cert path + env var
names)
- Log successful TLS trust environment configuration
## Usage
Enable with `DEBUG=cmd:proxy ./awmg proxy ...` or `DEBUG=* ./awmg proxy
...`.
## Validation
- `go build` passes (GOTOOLCHAIN=auto go1.25.0)
- `go vet ./internal/cmd/...` passes
- `gofmt` clean
- All unit tests pass (pre-existing `TestFetchAndFixSchema_NetworkError`
failure is unrelated to this change and reproducible on `main` without
my changes)
> [!WARNING]
> <details>
> <summary><strong>1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
| |||
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
| 241 | + | |
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
| 247 | + | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
| |||
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
| 326 | + | |
321 | 327 | | |
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
325 | 331 | | |
| 332 | + | |
326 | 333 | | |
327 | 334 | | |
0 commit comments