[log] Add debug logging to CLI utility functions #3529
Merged
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 4 CLI utility files with strategic debug logging following project guidelines from AGENTS.md. These files handle core CLI operations like JQ filtering, file tracking, import processing, and frontmatter manipulation.
Files Enhanced
pkg/cli/jq.go (
cli:jq)pkg/cli/file_tracker.go (
cli:file_tracker)pkg/cli/imports.go (
cli:imports)@includedirective processingpkg/cli/frontmatter_utils.go (
cli:frontmatter_utils)Logging Best Practices Followed
✅ Proper logger naming convention (
pkg:filename)✅ No side effects in logger arguments
✅ Meaningful messages for debugging
✅ Logging at function entry and key operations
✅ Success and failure path tracking
✅ No duplicate logging with user-facing messages
Testing
make buildDEBUG=* ./gh-aw compile devCache Updated
Cache files updated in
/tmp/gh-aw/cache-memory/go-logger/:processed-files.json: Now tracks 29 enhanced fileslast-run.json: Updated to commit 0d0ab2f🤖 Generated with Claude Code