Allow users to see their own print statements in the logs#5
Open
brp-hiverge wants to merge 3 commits into
Open
Allow users to see their own print statements in the logs#5brp-hiverge wants to merge 3 commits into
brp-hiverge wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to make user code print() output visible in server logs in near real-time by streaming subprocess stdout/stderr line-by-line into the JSON logger, and adds a Ruff indentation setting to avoid auto-reformatting.
Changes:
- Add Ruff indentation configuration to match the repo’s 2-space Python indentation.
- Log subprocess stdout/stderr lines as they arrive (instead of waiting for process completion).
- Refactor
run_commandto drain stdout/stderr concurrently via background threads and still return the last stdout line on success.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| pyproject.toml | Adds Ruff config intended to enforce 2-space indentation. |
| common_tools.py | Streams subprocess stdout/stderr to structured logs and captures output concurrently via threads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
luc-hiverge
approved these changes
Jun 30, 2026
luc-hiverge
left a comment
There was a problem hiding this comment.
There was the idea to limit the number of line to something finite. I can't find it here.
…er to spam gigabytes into the logs
Author
Done now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(Also set indent-width = 2 matching current indentation so that code doesn't get reformatted)