Open
fix: align debug logger variable names with logXxx convention#9198
Conversation
Renames non-standard debug logger variables to follow the project's
logXxx naming convention defined in AGENTS.md:
- internal/auth/header.go: var log → var logAuth
- internal/guard/context.go: var log → var logContext
- internal/guard/registry.go: var debugLog → var logRegistry
- internal/server/{http_helpers,middleware,sdk_logging}.go: var logHelpers → var logServerHelpers
- internal/mcp/helpers.go: var logHelpers → var logMCPHelpers
Closes #9173, #9174, #9175
Copilot
AI
changed the title
[WIP] Analyze and resolve duplicate code issues
fix: align debug logger variable names with logXxx convention
Jul 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns debug logger identifiers with the repository’s logXxx naming convention without behavioral changes.
Changes:
- Renames ambiguous logger variables.
- Updates all associated call sites.
- Disambiguates helper loggers across packages.
Show a summary per file
| File | Description |
|---|---|
internal/auth/header.go |
Renames the authentication logger. |
internal/guard/context.go |
Renames the context logger. |
internal/guard/registry.go |
Renames the registry logger. |
internal/mcp/helpers.go |
Disambiguates the MCP helper logger. |
internal/server/http_helpers.go |
Disambiguates the server helper logger. |
internal/server/middleware.go |
Updates helper logger references. |
internal/server/sdk_logging.go |
Updates the response logger reference. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three files used non-standard names (
var log,var debugLog) and two packages each declared avar logHelpers— inconsistent with thelogXxxconvention in AGENTS.md and creating ambiguity when grepping.Renames
Non-standard names →
logXxx:internal/auth/header.go:log→logAuthinternal/guard/context.go:log→logContextinternal/guard/registry.go:debugLog→logRegistryDisambiguate duplicate
logHelpersacross packages:internal/server/{http_helpers,middleware,sdk_logging}.go:logHelpers→logServerHelpersinternal/mcp/helpers.go:logHelpers→logMCPHelpersBefore/after:
All call sites updated; no behavioral changes.