feat(autosynth): add LogCollector and Executor classes#531
feat(autosynth): add LogCollector and Executor classes#531chingor13 wants to merge 21 commits intogoogleapis:masterfrom
Conversation
Executors abstract away running processes and capturing the log output for later consumption. LogCollector will collect logs by type and let us craft the desired logging artifacts.
SurferJeffAtGoogle
left a comment
There was a problem hiding this comment.
This PR will take me a while to grok.
The description describes LogCollector's purpose well. That helps.
But taking a step to a higher point of view, what are the goals of these code changes?
"Stop piping synthlog to stdout when running multi.py" appears to be one goal. Are there others?
|
The goal is to be able to organize and capture logs for debugging failures. Wrapping each shell execution gives us an easy entrypoint for capturing the logs to consume later. "Stop piping synthlog to stdout when running multi.py" was so that if you run |
autosynth.multi.py invokes autosynth.synth.py by creating a subprocess here: Line 21 in 5b48b07 If we want the output of autosynth.synth.py to go to a sponge_log.log file instead of stdout, we can set subprocess.run's stdout param to open("sponge_log.log", "w"). |
|
We also should be able to debug what commands are being executed. |
|
I see. We could create a `verbose_run()` function that logs commands
before running.
…On Tue, May 12, 2020 at 11:08 AM Jeff Ching ***@***.***> wrote:
We also should be able to debug what commands are being executed.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#531 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZ3TYVU256HMSXNZGPAHELRRGGANANCNFSM4M4O6KIA>
.
|
|
Going to go with a simpler method for now. |
Executors abstract away running processes and capturing the log output
for later consumption.
LogCollector will collect logs by type and let us craft the desired
logging artifacts.
autosynth.synth, synthtool logs are tee'ed to stdout and captured in sponge_log.log files and saved as build artifacts--hide-synth-logwhich is used byautosynth.multiwhich hides the synthtool logs -- the mainautosynth.multiinvocation won't show all the synthtool logs.autosynth.synthlog is also captured in a sponge_log.log and saved as a build artifact.Towards #540