Skip to content

Convert logging related gradle classes to java #44771

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

Merged
merged 5 commits into from
Jul 24, 2019

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Jul 23, 2019

This commit converts the logging related classes (only used for vagrant)
to java from groovy.

relates #34459

This commit converts the logging related classes (only used for vagrant)
to java from groovy.

relates elastic#34459
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst rjernst requested a review from mark-vieira July 23, 2019 19:22
Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

Couple minor comments but otherwise LGTM 👍


@Override
public void close() {
progressLogger.completed();
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to call flush() here just in case the parent caller doesn't. Same goes with the other logger impl.

* There is a Tap4j project but we can't use it because it wants to parse the
* entire TAP stream at once and won't parse it stream-wise.
*/
public class TapLoggerOutputStream extends LoggingOutputStream {
Copy link
Contributor

Choose a reason for hiding this comment

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

I had to do some googling to find out what "tap" is. Can we perhaps elaborate here in the javadoc on that, and even link to https://testanything.org?

} else {
// otherwise extend the buffer
final int newBufferLength = buffer.length + DEFAULT_BUFFER_LENGTH;
final byte[] newBuffer = new byte[newBufferLength];
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be simplified a bit with Arrays.copyOf()

@rjernst rjernst merged commit 1327b58 into elastic:master Jul 24, 2019
@rjernst rjernst deleted the distro_tests16 branch July 24, 2019 18:20
rjernst added a commit that referenced this pull request Jul 24, 2019
This commit converts the logging related classes (only used for vagrant)
to java from groovy.

relates #34459
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >refactoring Team:Delivery Meta label for Delivery team v7.4.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants