Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 22, 2025

  • Rename logger variables to "log" in all 5 Go files
    • pkg/cli/trial_command.go
    • pkg/workflow/claude_engine.go
    • pkg/workflow/expressions.go
    • pkg/workflow/js.go
    • pkg/workflow/mcp-config.go
  • Convert package-level loggers to function-scoped loggers
  • Update .github/workflows/go-logger.md instructions
    • Document the "always use 'log'" requirement
    • Explain function-scoped vs package-level logger usage
    • Update examples to show both patterns
    • Update quality checklist
  • Build and test changes successfully

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Changed all logger variable names from descriptive names (trialLog, claudeEngineLog, etc.) to simply "log" as requested in feedback.

Since multiple files in pkg/workflow and pkg/cli packages need loggers, converted to function-scoped loggers to avoid package-level variable conflicts:
- Function-scoped: log := logger.New("pkg:filename")
- Used in pkg/workflow and pkg/cli packages with multiple files

Updated go-logger.md workflow instructions to:
- Require logger variable always be named "log"
- Explain when to use function-scoped vs package-level loggers
- Document the package-level variable conflict issue
- Update examples and quality checklist

All changes verified with successful build and unit tests.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review October 22, 2025 08:51
@pelikhan pelikhan merged commit 4eacd1a into add-debug-logging-enhancements-415fdb20ce437ab5 Oct 22, 2025
6 checks passed
@pelikhan pelikhan deleted the copilot/stack-pr-2106 branch October 22, 2025 08:52
Copilot AI requested a review from pelikhan October 22, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants