Skip to content

docs: add debug logging to common-issues troubleshooting page#20725

Merged
pelikhan merged 2 commits intomainfrom
copilot/add-debug-logging-to-common-issues
Mar 12, 2026
Merged

docs: add debug logging to common-issues troubleshooting page#20725
pelikhan merged 2 commits intomainfrom
copilot/add-debug-logging-to-common-issues

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

The DEBUG environment variable for gh aw commands was only documented in AGENTS.md (developer-facing), leaving users without a discoverable path to internal diagnostic logging when troubleshooting.

Changes

  • docs/src/content/docs/troubleshooting/common-issues.md: Added a new "Enable Debug Logging" subsection under "Workflow Failures and Debugging" covering:
    • DEBUG=* to enable all logs, package-scoped patterns (workflow:*, cli:*, parser:*), multi-package combos, and exclusion syntax
    • DEBUG_COLORS=0 for clean log capture to file
    • Explanation of log line anatomy: namespace, message, and elapsed-time diff
    • pkg:filename namespace convention with common namespace examples

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build tion instructio (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Add the "debug logging" from agents.md into the common-issues page in the debugging section so that user discover how to use the logging system.

Custom agent used: technical-doc-writer
AI technical documentation writer for GitHub Actions library using GitHub Docs voice


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add debug logging to common issues page docs: add debug logging to common-issues troubleshooting page Mar 12, 2026
Copilot AI requested a review from pelikhan March 12, 2026 22:12
@pelikhan pelikhan marked this pull request as ready for review March 12, 2026 22:14
Copilot AI review requested due to automatic review settings March 12, 2026 22:14
@pelikhan pelikhan merged commit 1659bb1 into main Mar 12, 2026
@pelikhan pelikhan deleted the copilot/add-debug-logging-to-common-issues branch March 12, 2026 22:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds user-facing troubleshooting documentation for enabling internal debug logging in gh aw commands, making diagnostic output discoverable outside developer-focused docs.

Changes:

  • Added an “Enable Debug Logging” subsection to the Common Issues troubleshooting page with DEBUG / DEBUG_COLORS usage patterns and log output interpretation.
  • Updated the Agent Factory status page to include the “Smoke Workflow Call with Inputs” workflow entry.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/src/content/docs/troubleshooting/common-issues.md Documents how to enable and interpret internal debug logs for troubleshooting workflow failures.
docs/src/content/docs/agent-factory-status.mdx Adds the missing “Smoke Workflow Call with Inputs” row to the workflow status table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Each log line shows:
- **Namespace** – the package and component that emitted it (e.g., `workflow:compiler`)
- **Message** – what the CLI was doing at that moment
- **Time elapsed** – time since the previous log entry (e.g., `+125ms`), which helps identify slow steps
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description of the time diff (+125ms) is slightly inaccurate: the logger tracks lastLog per-namespace (per logger.New(...) instance), so the diff is time since the last message from the same logger/namespace, not necessarily since the previous line in the combined output. Consider rewording to avoid implying it’s always a global “previous log entry” diff, especially when multiple namespaces are enabled and interleave.

Suggested change
- **Time elapsed** – time since the previous log entry (e.g., `+125ms`), which helps identify slow steps
- **Time elapsed** – time since the previous log entry from the same namespace (e.g., `+125ms`), which helps identify slow steps

Copilot uses AI. Check for mistakes.
- **Message** – what the CLI was doing at that moment
- **Time elapsed** – time since the previous log entry (e.g., `+125ms`), which helps identify slow steps

Log namespaces follow a `pkg:filename` convention. Common namespaces include `cli:compile_command`, `workflow:compiler`, `workflow:expression_extraction`, and `parser:frontmatter`. Wildcards (`*`) match any suffix, so `workflow:*` captures all workflow-package logs.
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph says namespaces follow a strict pkg:filename convention, but the logger docs and codebase use both pkg:filename and pkg:component (e.g., workflow:compiler). To avoid contradicting the examples in the same sentence, consider updating the convention wording to reflect both allowed forms.

Suggested change
Log namespaces follow a `pkg:filename` convention. Common namespaces include `cli:compile_command`, `workflow:compiler`, `workflow:expression_extraction`, and `parser:frontmatter`. Wildcards (`*`) match any suffix, so `workflow:*` captures all workflow-package logs.
Log namespaces typically follow a `pkg:filename` or `pkg:component` convention. Common namespaces include `cli:compile_command`, `workflow:compiler`, `workflow:expression_extraction`, and `parser:frontmatter`. Wildcards (`*`) match any suffix, so `workflow:*` captures all workflow-package logs.

Copilot uses AI. Check for mistakes.
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.

3 participants