Skip to content

Update AGENTS.md with comprehensive DEBUG environment variable documentation#2131

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/update-agents-md-debug-logging
Closed

Update AGENTS.md with comprehensive DEBUG environment variable documentation#2131
Copilot wants to merge 2 commits intomainfrom
copilot/update-agents-md-debug-logging

Conversation

Copy link
Contributor

Copilot AI commented Oct 22, 2025

Overview

Enhanced the DEBUG logging documentation in AGENTS.md to provide comprehensive guidance on using the DEBUG environment variable for troubleshooting and development.

Changes

The "Debug Output Control" section now includes:

Additional Pattern Examples

  1. Exact namespace matching - Target a specific logger without wildcards:

    DEBUG=cli:compile_command gh aw compile
  2. Suffix wildcard matching - Match all loggers ending with a specific suffix:

    DEBUG=*:compiler gh aw compile
  3. Middle wildcard matching - Match loggers with both prefix and suffix:

    DEBUG=cli:*:command gh aw compile
  4. Namespace exclusion - Exclude an entire namespace:

    DEBUG=*,-cli:* gh aw compile

New Pattern Matching Rules Section

Added a dedicated section documenting all supported pattern types:

  • Wildcard matching (*)
  • Prefix wildcards (namespace:*)
  • Suffix wildcards (*:suffix)
  • Middle wildcards (prefix:*:suffix)
  • Exact namespace matching
  • Exclusion patterns (-pattern)
  • Pattern combination with commas

Clarifications

  • Updated comments to be more descriptive (e.g., "Enable specific package (prefix wildcard)")
  • Added note that spaces in comma-separated patterns require shell quoting
  • Clarified that colors are auto-disabled when piping to files/commands

Testing

All documented patterns were tested and verified to work correctly:

  • ✅ Prefix wildcard: DEBUG=cli:*
  • ✅ Exclusion: DEBUG=*,-cli:*
  • ✅ Multiple patterns with spaces: DEBUG="cli:* , workflow:*"
  • ✅ Exact matching: DEBUG=cli:compile_command
  • ✅ All unit and integration tests pass

The documentation is now comprehensive and aligned with the actual implementation in pkg/logger/logger.go.

Original prompt

Update AGENTS.md on how to set the DEBUG variable value to get additional logging.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update AGENTS.md to set DEBUG variable for logging Update AGENTS.md with comprehensive DEBUG environment variable documentation Oct 22, 2025
Copilot AI requested a review from pelikhan October 22, 2025 12:55
@pelikhan pelikhan closed this Oct 22, 2025
@pelikhan pelikhan deleted the copilot/update-agents-md-debug-logging branch October 23, 2025 21:23
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