Commit fe88214
authored
[log] Add debug logging to server HTTP server scaffold (#5388)
## Summary
Adds `logHTTPServer` debug logger to `internal/server/http_server.go` to
improve visibility into HTTP server creation and configuration during
startup.
## Changes
Added 4 meaningful debug log calls:
- `newHTTPServer`: logs the address when creating the HTTP server
- `buildMCPHTTPServer`: logs build parameters (address, auth/HMAC
enabled state), resolved session timeout, and completion status
## Why This Helps
The `buildMCPHTTPServer` function is the central scaffold used by both
routed and unified modes. With `DEBUG=server:*`, operators can now
trace:
- Which address the server binds to
- Whether auth and HMAC signing are active
- What session timeout was resolved from the environment
## Validation
- `go test ./internal/...` passes (exit 0)
- Logger follows `pkg:filename` naming convention:
`"server:http_server"`
- No side effects in log arguments (only reads existing variables)
- Single file modified
> Generated by [Go Logger
Enhancement](https://github.com/github/gh-aw-mcpg/actions/runs/25614578224/agentic_workflow)
· ● 3.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: 25614578224, workflow_id:
go-logger, run:
https://github.com/github/gh-aw-mcpg/actions/runs/25614578224 -->
<!-- gh-aw-workflow-id: go-logger -->1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| 35 | + | |
30 | 36 | | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
0 commit comments