Search in sources :

Example 11 with OutputEventListener

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));
}
Also used : StyledTextOutputBackedRenderer(org.gradle.internal.logging.console.StyledTextOutputBackedRenderer) StreamingStyledTextOutput(org.gradle.internal.logging.text.StreamingStyledTextOutput) OutputEventListener(org.gradle.internal.logging.events.OutputEventListener) ThrottlingOutputEventListener(org.gradle.internal.logging.console.ThrottlingOutputEventListener) StreamBackedStandardOutputListener(org.gradle.internal.logging.text.StreamBackedStandardOutputListener)

Example 12 with OutputEventListener

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

Example 13 with OutputEventListener

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

Example 14 with OutputEventListener

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);
}
Also used : StyledTextOutputBackedRenderer(org.gradle.internal.logging.console.StyledTextOutputBackedRenderer) StreamingStyledTextOutput(org.gradle.internal.logging.text.StreamingStyledTextOutput) OutputEventListener(org.gradle.internal.logging.events.OutputEventListener) ThrottlingOutputEventListener(org.gradle.internal.logging.console.ThrottlingOutputEventListener) StreamBackedStandardOutputListener(org.gradle.internal.logging.text.StreamBackedStandardOutputListener)

Aggregations

OutputEventListener (org.gradle.internal.logging.events.OutputEventListener)14 StyledTextOutputBackedRenderer (org.gradle.internal.logging.console.StyledTextOutputBackedRenderer)9 ThrottlingOutputEventListener (org.gradle.internal.logging.console.ThrottlingOutputEventListener)9 StreamBackedStandardOutputListener (org.gradle.internal.logging.text.StreamBackedStandardOutputListener)7 StreamingStyledTextOutput (org.gradle.internal.logging.text.StreamingStyledTextOutput)6 StandardOutputListener (org.gradle.api.logging.StandardOutputListener)3 BuildLogLevelFilterRenderer (org.gradle.internal.logging.console.BuildLogLevelFilterRenderer)2 FlushConsoleListener (org.gradle.internal.logging.console.FlushConsoleListener)2 LogEvent (org.gradle.internal.logging.events.LogEvent)2 LogLevelChangeEvent (org.gradle.internal.logging.events.LogLevelChangeEvent)2 LoggingSourceSystem (org.gradle.internal.logging.config.LoggingSourceSystem)1 LoggingSystemAdapter (org.gradle.internal.logging.config.LoggingSystemAdapter)1 BuildStatusRenderer (org.gradle.internal.logging.console.BuildStatusRenderer)1 DefaultWorkInProgressFormatter (org.gradle.internal.logging.console.DefaultWorkInProgressFormatter)1 UserInputStandardOutputRenderer (org.gradle.internal.logging.console.UserInputStandardOutputRenderer)1 WorkInProgressRenderer (org.gradle.internal.logging.console.WorkInProgressRenderer)1 BatchOutputEventListener (org.gradle.internal.logging.events.BatchOutputEventListener)1 EndOutputEvent (org.gradle.internal.logging.events.EndOutputEvent)1 FlushOutputEvent (org.gradle.internal.logging.events.FlushOutputEvent)1 OutputEvent (org.gradle.internal.logging.events.OutputEvent)1