[log] Enhance debug logging in engine and workflow processing files #4328
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.
Summary
Enhanced debug logging in 5 key Go files to improve troubleshooting and development workflow visibility. All files already had logger declarations but minimal logging calls, making them ideal candidates for enhancement.
Files Enhanced
1.
pkg/workflow/copilot_engine.go(882 lines, 2→8 logging calls)2.
pkg/workflow/frontmatter_extraction.go(714 lines, 2→6 logging calls)log.Enabled())3.
pkg/workflow/safe_jobs.go(383 lines, 2→8 logging calls)4.
pkg/workflow/claude_tools.go(371 lines, 2→5 logging calls)log.Enabled())5.
pkg/workflow/claude_engine.go(296 lines, 2→6 logging calls)Logging Guidelines Followed
✅ Added logging at function entry points with key parameters
✅ Logged important control flow decisions
✅ Logged state changes and configuration applications
✅ Used existing variables without side effects (no function calls in log args)
✅ Applied
log.Enabled()checks for verbose operations✅ Followed project naming convention (
pkg:filename)✅ Maximum 5 files per PR (focused and reviewable)
✅ No test files modified
Validation
make build(no compilation errors)DEBUG=* ./gh-aw compile dev- logging output verifiedExample Output
Quality Checklist
*_test.go)make buildDEBUG=* ./gh-aw compile dev🤖 Generated with Claude Code