-
Notifications
You must be signed in to change notification settings - Fork 12
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
Redirect child processes' stderr to the parent stdout #63
Conversation
We want to do this to log all lines printed by child processes. Sometimes solbuild builds big packages that may take hours; it's handy to fire it and let it work and check the output later. E.g.: sudo solbuild build > log.txt Fixes #54.
Ping? |
Ah, @ermo made an objection to this task: #54 (comment) |
I have since changed my mind. I think this should be landed. |
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.
On second thought, I think we should land this.
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.
LGTM, thanks!
After this change it is possible to differentiate between the log output from solbuild itself, and the output from commands executed by solbuild. This allows one to check the build result on the terminal and keep the redirected stdout for checking the reason for the build result. This is a follow-up of #54/#63. Additionally, the progress bar is replaced by a log statement when redirected. For example: ``` $ sudo solbuild build package.yml -p unstable-x86_64 > /tmp/output.log ✓ > Downloading source uri=https://www.nano-editor.org/dist/v7/nano-7.2.tar.xz ✓ > Now starting build package=nano ✓ > Building succeeded ```
We want to do this to log all lines printed by child processes. Sometimes solbuild builds big packages that may take hours; it's handy to fire it and let it work and check the output later. E.g.:
Fixes #54.