[log] Add debug logging to 5 key Go files#2124
Merged
Conversation
Added meaningful debug logging statements to help with troubleshooting and development in the following files:
1. pkg/cli/run_command.go - Added runLog for workflow run operations
- Logs workflow validation (local/remote)
- Logs workflow trigger success
- Logs workflow run URLs and IDs
2. pkg/parser/schema.go - Added schemaLog for schema validation
- Logs validation of main workflow frontmatter
- Logs validation of included file frontmatter
- Logs engine-specific rule validation
3. pkg/workflow/expressions.go - Added expressionsLog for expression parsing
- Logs expression parsing start/success/failure
- Logs token count after successful parsing
- Logs when breaking long expressions
4. pkg/cli/audit.go - Added auditLog for audit operations
- Logs audit start with run details
- Logs output directory usage
- Logs artifact download operations
5. pkg/workflow/permissions.go - Added permissionsLog for permissions handling
- Logs permissions parser creation
- Logs permissions YAML parsing
- Logs contents read access checks
All logging follows the project's conventions:
- Uses logger.New("pkg:filename") pattern
- Log arguments have no side effects
- Meaningful messages for debugging
- No duplication with user-facing messages
Changes validated with:
- make build (successful compilation)
- DEBUG=* ./gh-aw compile dev (verified debug output)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
pelikhan
reviewed
Oct 22, 2025
Contributor
Contributor
pelikhan
approved these changes
Oct 22, 2025
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.
Summary
Added meaningful debug logging statements to 5 strategic files to help with troubleshooting and development:
Details
Files Enhanced
pkg/cli/run_command.go (
runLog)pkg/parser/schema.go (
schemaLog)pkg/workflow/expressions.go (
expressionsLog)pkg/cli/audit.go (
auditLog)pkg/workflow/permissions.go (
permissionsLog)Guidelines Followed
✅ Maximum 5 files per PR (exactly 5 files modified)
✅ No test files modified
✅ Logger naming convention:
pkg:filenamepattern✅ Logger arguments have no side effects
✅ Meaningful, helpful messages for debugging
✅ No duplication with user-facing messages
Test Plan
make buildDEBUG=* ./gh-aw compile devExample Debug Output
🤖 Generated with Claude Code