Skip to content

Migrate verbose logging to use logger package in run_command.go#2130

Closed
Copilot wants to merge 2 commits intoadd-debug-logging-to-5-files-044d07c55c2435ebfrom
copilot/stack-pr-2124
Closed

Migrate verbose logging to use logger package in run_command.go#2130
Copilot wants to merge 2 commits intoadd-debug-logging-to-5-files-044d07c55c2435ebfrom
copilot/stack-pr-2124

Conversation

Copy link
Contributor

Copilot AI commented Oct 22, 2025

Thanks for the feedback on #2124. This PR migrates verbose logging to use the logger package instead of fmt.Printf calls.

Original PR: #2124
Triggering review: #2124 (review)

Changes Made

Migrated all fmt.Printf verbose logging in pkg/cli/run_command.go to use the runLog.Printf() logger pattern:

  • Removed verbose flag checks: Converted if verbose { fmt.Printf(...) } patterns to runLog.Printf(...)
  • Logger integration: All debug/verbose output now uses the existing runLog logger (logger.New("cli:run_command"))
  • Preserved user-facing messages: Success messages and URLs continue to use console formatting for end-user output
  • Debug control: Verbose output can now be controlled via DEBUG=cli:run_command environment variable

Testing

  • ✅ Build passes: make build
  • ✅ All unit tests pass: make test-unit
  • ✅ Logger pattern verified to follow project conventions
  • ✅ Debug output control validated with DEBUG=cli:run_command

The changes reduce code verbosity (removed 70 lines, added 35 lines) while maintaining the same functionality with better control through the DEBUG environment variable.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Migrated all fmt.Printf verbose logging to use runLog.Printf() for debug output.
This follows the project's logger pattern and allows controlled debug output via
the DEBUG environment variable.

Changes:
- Removed verbose flag checks and replaced fmt.Printf with runLog.Printf
- All verbose output now goes through the logger package
- User-facing messages (success, errors) continue to use console formatting
- Debug logging can be enabled with DEBUG=cli:run_command environment variable

Validated with:
- make build (successful compilation)
- make test-unit (all tests pass)
- DEBUG=cli:run_command ./gh-aw --help (logger working correctly)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix feedback on debugging and logging enhancements in Go files Migrate verbose logging to use logger package in run_command.go Oct 22, 2025
Copilot AI requested a review from pelikhan October 22, 2025 12:57
@pelikhan pelikhan closed this Oct 22, 2025
@pelikhan pelikhan deleted the copilot/stack-pr-2124 branch October 22, 2025 13:04
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