Skip to content
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

M Execution logging #191

Merged
merged 2 commits into from
Nov 1, 2018
Merged

M Execution logging #191

merged 2 commits into from
Nov 1, 2018

Conversation

werkt
Copy link
Collaborator

@werkt werkt commented Oct 23, 2018

With an addition to the README.md to use an example logging
configuration to provide some feedback on executions.

With an addition to the README.md to use an example logging
configuration to provide some feedback on executions.
@werkt werkt changed the title Execution logging M Execution logging Oct 24, 2018
@werkt werkt mentioned this pull request Oct 24, 2018
Process process;
try {
process = processBuilder.start();
process.getOutputStream().close();
} catch(IOException ex) {
ex.printStackTrace();
// again, should we do something else here??
resultBuilder.setExitCode(exitValue);
resultBuilder.setExitCode(exitCode);

Choose a reason for hiding this comment

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

Sorry, I'm having a code-read fail -- can the exitCode here ever be not -1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It cannot, the exitCode assignments after the default initialization all occur after this. lmk if you think that merits different behavior here

Choose a reason for hiding this comment

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

Oh, then I would very much prefer you just say -1 here, to not make the reader think about what the value might be.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pedantically, I used the exitCode here to match the releaseExecutor information propagated to the ExecuteActionStage so that there would not be any discontinuity between what is logged and what is recorded in the resultBuilder, but I see the point.

Use a constant to describe an incomplete exit code as a result of an IOException on process creation.
@werkt werkt merged commit ec7a053 into bazelbuild:master Nov 1, 2018
@werkt werkt deleted the logging branch December 3, 2018 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants