use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class OutputEventRenderer method addRichConsole.
public void addRichConsole(Console stdout, Console stderr, ConsoleMetaData consoleMetaData, boolean verbose) {
OutputEventListener stdoutChain = new StyledTextOutputBackedRenderer(stdout.getBuildOutputArea());
OutputEventListener stderrChain = new FlushConsoleListener(stderr, new StyledTextOutputBackedRenderer(stderr.getBuildOutputArea()));
OutputEventListener consoleListener = new ErrorOutputDispatchingListener(stderrChain, stdoutChain);
OutputEventListener consoleChain = getConsoleChainWithDynamicStdout(stdout, consoleMetaData, verbose, consoleListener);
addConsoleChain(consoleChain);
}
use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class OutputEventRenderer method addPlainConsole.
public void addPlainConsole(OutputStream stdout, OutputStream stderr) {
OutputEventListener stdoutChain = new StyledTextOutputBackedRenderer(new StreamingStyledTextOutput(new StreamBackedStandardOutputListener(stdout)));
OutputEventListener stderrChain = new StyledTextOutputBackedRenderer(new StreamingStyledTextOutput(new StreamBackedStandardOutputListener(stderr)));
OutputEventListener outputListener = new ErrorOutputDispatchingListener(stderrChain, stdoutChain);
addConsoleChain(getConsoleChainWithoutDynamicStdout(outputListener, true));
}
use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class DefaultLoggingManager method stop.
@Override
public DefaultLoggingManager stop() {
try {
CompositeStoppable.stoppable(slf4jLoggingSystem, javaUtilLoggingSystem, stdOutLoggingSystem, stdErrLoggingSystem).stop();
for (StandardOutputListener stdoutListener : stdoutListeners) {
loggingOutput.removeStandardOutputListener(stdoutListener);
}
for (StandardOutputListener stderrListener : stderrListeners) {
loggingOutput.removeStandardErrorListener(stderrListener);
}
for (OutputEventListener listener : outputEventListeners) {
loggingOutput.removeOutputEventListener(listener);
}
loggingRouter.stop();
} finally {
started = false;
}
return this;
}
use of org.gradle.internal.logging.events.OutputEventListener 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;
}
use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class OutputEventRenderer method addPlainConsole.
private OutputEventRenderer addPlainConsole(StandardOutputListener outputListener) {
OutputEventListener stdoutChain = new UserInputStandardOutputRenderer(new StyledTextOutputBackedRenderer(new StreamingStyledTextOutput(outputListener)), clock);
OutputEventListener consoleChain = new ThrottlingOutputEventListener(new BuildLogLevelFilterRenderer(new GroupingProgressLogEventGenerator(stdoutChain, clock, new PrettyPrefixedLogHeaderFormatter(), true)), clock);
return addConsoleChain(consoleChain, true, true);
}
Aggregations