-
Notifications
You must be signed in to change notification settings - Fork 36
Print gateway log files to core.info in parse_mcp_gateway_log.cjs #9824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added printAllGatewayFiles() function to list and print all files in /tmp/gh-aw/mcp-logs and /tmp/gh-aw/mcp-config - Function prints directory structure, file sizes, and file contents (up to 1MB) - Updated main() to call printAllGatewayFiles() at the start for comprehensive debugging - Added comprehensive tests for the new function - Properly handles TypeScript error types with unknown type annotations - All tests passing and code formatted Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot do not render config folder
|
- Modified printAllGatewayFiles() to only scan /tmp/gh-aw/mcp-logs - Removed /tmp/gh-aw/mcp-config from scanned directories - Updated tests to reflect that only logs directory is rendered - All 19 tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. The config directory is now excluded from the output. Only Fixed in commit 804c8fd. Updated output now shows only the logs directory: The |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
Keep the output style simple; filename and content. No indentation, no headers... |
- Modified printAllGatewayFiles() to truncate file content at 10KB - Files larger than 10KB now show first 10KB followed by "..." and truncation message - Added test for truncation behavior with 15KB file - Config directory already excluded (no change needed) - All 20 tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Both requirements implemented:
Fixed in commit 5e7ce3b. Example output for large file: Example output for small file: Files under 10KB are shown in full. Files over 10KB show the first 10KB followed by "..." and a truncation message indicating the total size. |
Smoke Test Results (Run #20959774089)Last 2 Merged PRs:
Test Results:
Overall Status: PASS cc @pelikhan
|
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall: PASS ✅
|
The MCP gateway log parser was only printing file existence and size metadata without showing actual file contents, making it difficult to diagnose gateway startup issues and errors.
Changes
printAllGatewayFiles()function that scans/tmp/gh-aw/mcp-logs, printing file contents (limited to 10KB per file) tocore.infowith clear delimitersmain()to callprintAllGatewayFiles()at start before processing gateway.md/gateway.logunknowntype annotations for catch blocksOutput Format
Small files (under 10KB):
Large files (over 10KB):
This provides visibility into gateway logs for debugging workflow failures while:
/tmp/gh-aw/mcp-configis not scanned)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.