Skip to content

[log] Add debug logging to cmd/proxy#4134

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
log/proxy-cmd-debug-logging-9fc8f95db1c3b736
Draft

[log] Add debug logging to cmd/proxy#4134
github-actions[bot] wants to merge 1 commit intomainfrom
log/proxy-cmd-debug-logging-9fc8f95db1c3b736

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • invalidhostthatdoesnotexist12345.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "invalidhostthatdoesnotexist12345.com"

See Network Configuration for more information.

Generated by Go Logger Enhancement · ● 5.8M ·

Adds 5 new logProxyCmd debug log calls to improve troubleshooting of
the proxy subcommand:

- Log proxy server creation parameters (guard path, policy presence,
  DIFC mode, trusted bot/user counts) before proxy.New
- Log successful proxy server creation
- Log HTTP server creation with TLS state
- Log when TLS configuration is applied to the HTTP server
- Log TLS trust environment setup (CA cert path and env vars being set)
- Log successful TLS trust environment configuration

These debug logs are controlled by DEBUG=cmd:proxy and write to both
stderr (colorized, with time diffs) and the gateway log file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

0 participants