use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class OutputEventRenderer method addPlainConsoleWithErrorOutputOnStdout.
public void addPlainConsoleWithErrorOutputOnStdout(OutputStream stdout) {
OutputEventListener stdoutChain = new StyledTextOutputBackedRenderer(new StreamingStyledTextOutput(new StreamBackedStandardOutputListener(stdout)));
addConsoleChain(getConsoleChainWithoutDynamicStdout(stdoutChain, true));
}
use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class OutputEventRenderer method addRichConsoleWithErrorOutputOnStdout.
public void addRichConsoleWithErrorOutputOnStdout(Console stdout, ConsoleMetaData consoleMetaData, boolean verbose) {
OutputEventListener consoleListener = new StyledTextOutputBackedRenderer(stdout.getBuildOutputArea());
OutputEventListener consoleChain = getConsoleChainWithDynamicStdout(stdout, consoleMetaData, verbose, consoleListener);
addConsoleChain(consoleChain);
}
use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class OutputEventListenerBackedLogger method log.
@Override
void log(LogLevel logLevel, Throwable throwable, String message, OperationIdentifier operationIdentifier) {
LogEvent logEvent = new LogEvent(clock.getCurrentTime(), name, logLevel, message, throwable, operationIdentifier);
OutputEventListener outputEventListener = context.getOutputEventListener();
try {
outputEventListener.onOutput(logEvent);
} catch (Throwable e) {
// fall back to standard out
e.printStackTrace(System.out);
}
}
use of org.gradle.internal.logging.events.OutputEventListener in project gradle by gradle.
the class OutputEventRenderer method addRichConsole.
public void addRichConsole(Console stdout, OutputStream stderr, ConsoleMetaData consoleMetaData, boolean verbose) {
OutputEventListener stdoutChain = new StyledTextOutputBackedRenderer(stdout.getBuildOutputArea());
OutputEventListener stderrChain = new StyledTextOutputBackedRenderer(new StreamingStyledTextOutput(new StreamBackedStandardOutputListener(stderr)));
OutputEventListener consoleListener = new ErrorOutputDispatchingListener(stderrChain, stdoutChain);
OutputEventListener consoleChain = getConsoleChainWithDynamicStdout(stdout, consoleMetaData, verbose, consoleListener);
addConsoleChain(consoleChain);
}
Aggregations