Skip to content

[log] Add debug logging to 5 workflow and CLI files#2606

Merged
pelikhan merged 1 commit intomainfrom
log/add-debug-logging-to-5-files-bc59d03c86276ed2
Oct 27, 2025
Merged

[log] Add debug logging to 5 workflow and CLI files#2606
pelikhan merged 1 commit intomainfrom
log/add-debug-logging-to-5-files-bc59d03c86276ed2

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

Added meaningful debug logging statements to 5 Go files in the pkg/ directory to help with troubleshooting and development.

Files Modified

  1. pkg/workflow/tools.go - Added toolsLog logger

    • Logs workflow defaults application
    • Logs command trigger configuration
    • Logs tool and MCP server merging operations
  2. pkg/workflow/safe_outputs.go - Added safeOutputsLog logger

    • Logs safe-outputs configuration extraction from frontmatter
    • Logs enabled check results
  3. pkg/workflow/firewall.go - Added firewallLog logger

    • Logs firewall enabled checks
    • Logs firewall configuration retrieval with details (enabled, version, log level)
  4. pkg/cli/mcp_inspect.go - Added mcpInspectLog logger

    • Logs MCP inspection operations
    • Logs workflow and filter parameters
    • Logs import application to frontmatter
  5. pkg/workflow/cache.go - Added cacheLog logger

    • Logs cache-memory configuration extraction
    • Logs cache array processing
    • Logs cache-memory step generation

Logger Naming Convention

All loggers follow the project's naming convention (pkg:filename):

  • workflow:tools
  • workflow:safe_outputs
  • workflow:firewall
  • cli:mcp_inspect
  • workflow:cache

Testing

✅ Validated with make build - no compilation errors
✅ Tested with DEBUG=* ./gh-aw compile dev - debug logs appear correctly
✅ Logger arguments have no side effects
✅ Logging messages are meaningful and provide debugging context

Example Debug Output

workflow:tools Applying defaults to workflow: name=Dev, path=/home/runner/work/gh-aw/gh-aw/.github/workflows/dev.md
workflow:tools Merging tools and MCP servers: topTools=1, mcpServers=0
workflow:safe_outputs Extracting safe-outputs configuration from frontmatter
workflow:safe_outputs Safe outputs enabled check: true
workflow:firewall Firewall not configured, returning false
workflow:cache Extracting cache-memory configuration from tools

🤖 Generated with Claude Code

AI generated by Go Logger Enhancement

Added meaningful debug logging statements to help with troubleshooting and development.

Changes:
- pkg/workflow/tools.go: Added logger for workflow defaults, command trigger configuration, and tool merging
- pkg/workflow/safe_outputs.go: Added logger for safe-outputs extraction and enabled checks
- pkg/workflow/firewall.go: Added logger for firewall configuration and enabled checks
- pkg/cli/mcp_inspect.go: Added logger for MCP inspection operations and import merging
- pkg/workflow/cache.go: Added logger for cache-memory configuration extraction and step generation

All loggers follow the project's naming convention (pkg:filename) and use meaningful messages that provide context for debugging without causing side effects.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added automation enhancement New feature or request labels Oct 27, 2025
@pelikhan pelikhan merged commit 8b2fe3e into main Oct 27, 2025
4 checks passed
@pelikhan pelikhan deleted the log/add-debug-logging-to-5-files-bc59d03c86276ed2 branch October 27, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant