Skip to content

[log] Add debug logging to config_core.go#4074

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
log/config-core-debug-logging-e98f5da26177fbfc
Draft

[log] Add debug logging to config_core.go#4074
github-actions[bot] wants to merge 1 commit intomainfrom
log/config-core-debug-logging-e98f5da26177fbfc

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Adds 5 meaningful debug logging calls to internal/config/config_core.go using the existing logConfig logger ("config:config").

Changes

applyGatewayDefaults — logs resolved defaults after all zero-value fields are filled in:

Applied gateway defaults: port=3000, startupTimeout=30, toolTimeout=60, keepaliveInterval=1500

LoadFromFile — adds intermediate progress logs between the existing entry/exit log calls:

  1. Before unknown-field check: Checking N undecoded TOML keys against allowed fields
  2. Before stdio containerization validation: Validating stdio server containerization requirements for N servers
  3. Before auth validation loop: Validating auth configuration for N servers
  4. When opentelemetry section is present: opentelemetry section found: merging into tracing config, endpoint=...

Why

LoadFromFile already logs at entry and exit but its many intermediate validation steps were invisible under debug logging. These additions make it easy to pinpoint which validation step fails or how far initialization progressed when troubleshooting startup issues with DEBUG=config:*.

Validation

  • go build ./... — passes ✅
  • go vet ./... — passes ✅
  • go test ./internal/... — all packages pass; only TestFetchAndFixSchema_NetworkError fails, which is a pre-existing network-dependent test failure unrelated to these 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 · ● 8.4M ·

…ults

- Log undecoded TOML key count before unknown-field validation
- Log server count before stdio containerization validation
- Log server count before auth configuration validation
- Log when opentelemetry config is merged into tracing
- Log applied gateway defaults (port, timeouts, keepalive interval)

These log calls use the existing logConfig logger and are activated
via DEBUG=config:* or DEBUG=* to help diagnose configuration loading
issues at startup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot added automation enhancement New feature or request labels Apr 18, 2026
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