Search in sources :

Example 1 with DefaultWorkInProgressFormatter

use of org.gradle.internal.logging.console.DefaultWorkInProgressFormatter in project gradle by gradle.

the class OutputEventRenderer method addConsole.

public OutputEventRenderer addConsole(Console console, boolean stdout, boolean stderr, ConsoleMetaData consoleMetaData) {
    final OutputEventListener consoleChain = new ThrottlingOutputEventListener(new BuildStatusRenderer(new WorkInProgressRenderer(new ProgressLogEventGenerator(new StyledTextOutputBackedRenderer(console.getBuildOutputArea()), true), console.getBuildProgressArea(), new DefaultWorkInProgressFormatter(consoleMetaData)), console.getStatusBar(), console, consoleMetaData), new TrueTimeProvider());
    synchronized (lock) {
        if (stdout && stderr) {
            this.console = consoleChain;
            removeStandardOutputListener();
            removeStandardErrorListener();
        } else if (stdout) {
            this.console = onNonError(consoleChain);
            removeStandardOutputListener();
        } else {
            this.console = onError(consoleChain);
            removeStandardErrorListener();
        }
        consoleChain.onOutput(new LogLevelChangeEvent(logLevel));
        formatters.add(this.console);
    }
    return this;
}
Also used : LogLevelChangeEvent(org.gradle.internal.logging.events.LogLevelChangeEvent) BuildStatusRenderer(org.gradle.internal.logging.console.BuildStatusRenderer) ThrottlingOutputEventListener(org.gradle.internal.logging.console.ThrottlingOutputEventListener) StyledTextOutputBackedRenderer(org.gradle.internal.logging.console.StyledTextOutputBackedRenderer) TrueTimeProvider(org.gradle.internal.time.TrueTimeProvider) WorkInProgressRenderer(org.gradle.internal.logging.console.WorkInProgressRenderer) OutputEventListener(org.gradle.internal.logging.events.OutputEventListener) BatchOutputEventListener(org.gradle.internal.logging.events.BatchOutputEventListener) ThrottlingOutputEventListener(org.gradle.internal.logging.console.ThrottlingOutputEventListener) DefaultWorkInProgressFormatter(org.gradle.internal.logging.console.DefaultWorkInProgressFormatter)

Aggregations

BuildStatusRenderer (org.gradle.internal.logging.console.BuildStatusRenderer)1 DefaultWorkInProgressFormatter (org.gradle.internal.logging.console.DefaultWorkInProgressFormatter)1 StyledTextOutputBackedRenderer (org.gradle.internal.logging.console.StyledTextOutputBackedRenderer)1 ThrottlingOutputEventListener (org.gradle.internal.logging.console.ThrottlingOutputEventListener)1 WorkInProgressRenderer (org.gradle.internal.logging.console.WorkInProgressRenderer)1 BatchOutputEventListener (org.gradle.internal.logging.events.BatchOutputEventListener)1 LogLevelChangeEvent (org.gradle.internal.logging.events.LogLevelChangeEvent)1 OutputEventListener (org.gradle.internal.logging.events.OutputEventListener)1 TrueTimeProvider (org.gradle.internal.time.TrueTimeProvider)1