Search in sources :

Example 1 with StyledTextOutputEvent

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);
}
Also used : StyledTextOutputEvent(org.gradle.internal.logging.events.StyledTextOutputEvent) LogLevel(org.gradle.api.logging.LogLevel)

Example 2 with StyledTextOutputEvent

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>();
}
Also used : StyledTextOutputEvent(org.gradle.internal.logging.events.StyledTextOutputEvent)

Aggregations

StyledTextOutputEvent (org.gradle.internal.logging.events.StyledTextOutputEvent)2 LogLevel (org.gradle.api.logging.LogLevel)1