use of org.gradle.internal.logging.events.StyledTextOutputEvent in project gradle by gradle.
the class StyledTextOutputEventSerializer method read.
@Override
public StyledTextOutputEvent read(Decoder decoder) throws Exception {
long timestamp = decoder.readLong();
String category = decoder.readString();
LogLevel logLevel = logLevelSerializer.read(decoder);
List<StyledTextOutputEvent.Span> spans = spanSerializer.read(decoder);
return new StyledTextOutputEvent(timestamp, category, logLevel, spans);
}
use of org.gradle.internal.logging.events.StyledTextOutputEvent in project gradle by gradle.
the class LoggingBackedStyledTextOutput method doEndLine.
@Override
protected void doEndLine(CharSequence endOfLine) {
buffer.append(endOfLine);
spans.add(new StyledTextOutputEvent.Span(this.style, buffer.toString()));
buffer.setLength(0);
listener.onOutput(new StyledTextOutputEvent(timeProvider.getCurrentTime(), category, logLevel, spans));
spans = new ArrayList<StyledTextOutputEvent.Span>();
}
Aggregations