Skip to content

[log] Add debug logging to internal/server/server.go#356

Merged
lpcox merged 1 commit intomainfrom
add-logging-server-server-9e75fd2579ede74f
Jan 19, 2026
Merged

[log] Add debug logging to internal/server/server.go#356
lpcox merged 1 commit intomainfrom
add-logging-server-server-9e75fd2579ede74f

Conversation

@github-actions
Copy link
Contributor

Summary

This PR adds debug logging to internal/server/server.go to enhance troubleshooting and visibility into server operations.

Changes

  • Added debug logger with namespace server:server following the pkg:filename convention
  • Added 7 logging statements to track key operations:
    1. Server creation with mode (unified vs routed)
    2. Route setup for different modes
    3. Handler registration for routed/unified endpoints
    4. Server selection in unified mode
    5. Path parsing in routed mode
    6. Request proxying decisions (including sys server routing)
    7. Server startup with listening address

Benefits

  • Better visibility into server mode selection and initialization
  • Debug tracking of request routing decisions
  • Easier troubleshooting of proxy target selection
  • Consistent logging infrastructure following project conventions

Testing

Changes follow the project's logging guidelines from AGENTS.md:

  • Logger uses pkg:filename naming convention
  • No side effects in logger arguments
  • Logs meaningful context for debugging
  • Complements existing operational logging

Enable debug output with:

DEBUG=server:server ./awmg --config config.toml
# or for all server logs
DEBUG=server:* ./awmg --config config.toml

Checklist

  • Single file modified (focused PR)
  • Logger naming follows pkg:filename convention
  • Logger arguments have no side effects
  • Logging messages are meaningful and helpful
  • No duplicate logging with existing logs
  • Import statements properly formatted

AI generated by Go Logger Enhancement

- Added debug logger with namespace 'server:server'
- Added 7 logging statements to track:
  - Server creation with mode
  - Route setup for routed/unified modes
  - Handler registration
  - Server selection in unified mode
  - Path parsing in routed mode
  - Request proxying decisions
  - Server startup

Enhances troubleshooting and visibility into server operations.
@github-actions github-actions bot added automation enhancement New feature or request labels Jan 19, 2026
@lpcox lpcox marked this pull request as ready for review January 19, 2026 16:53
@lpcox lpcox merged commit eb2603d into main Jan 19, 2026
@lpcox lpcox deleted the add-logging-server-server-9e75fd2579ede74f branch January 19, 2026 16:53
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.

1 participant