Skip to content

[log] Add debug logging to server HTTP server scaffold#5388

Merged
lpcox merged 1 commit into
mainfrom
log/http-server-logging-4ee695c3ab8f526a
May 9, 2026
Merged

[log] Add debug logging to server HTTP server scaffold#5388
lpcox merged 1 commit into
mainfrom
log/http-server-logging-4ee695c3ab8f526a

Conversation

@github-actions

@github-actions github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

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 · ● 3.2M ·

Add logHTTPServer debug logger to the HTTP server scaffold functions
to improve troubleshooting of server startup and configuration issues.

Logs include:
- HTTP server creation with address
- MCP HTTP server build parameters (address, auth/HMAC enabled flags)
- Session timeout configuration
- Server scaffold completion status

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels May 9, 2026
@lpcox lpcox marked this pull request as ready for review May 9, 2026 23:52
Copilot AI review requested due to automatic review settings May 9, 2026 23:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a dedicated debug logger for the HTTP server scaffold in internal/server/http_server.go, improving startup-time observability of server creation and key configuration (bind address, auth/HMAC enablement, and resolved session timeout) when DEBUG patterns enable server logs.

Changes:

  • Introduces a server:http_server debug logger (logHTTPServer) in the HTTP server scaffold file.
  • Adds debug logs in newHTTPServer and buildMCPHTTPServer to trace server creation and configuration inputs.
  • Logs the resolved session timeout and a “ready” marker once the scaffold is built.
Show a summary per file
File Description
internal/server/http_server.go Adds server:http_server debug logger and startup scaffold logging for HTTP server construction and session timeout resolution.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants