Search in sources :

Example 16 with ProgressLogger

use of org.gradle.internal.logging.progress.ProgressLogger in project gradle by gradle.

the class SynchronizedToolingImplementationLoader method create.

public ConsumerConnection create(Distribution distribution, ProgressLoggerFactory progressLoggerFactory, InternalBuildProgressListener progressListener, ConnectionParameters connectionParameters, BuildCancellationToken cancellationToken) {
    if (lock.tryLock()) {
        try {
            return delegate.create(distribution, progressLoggerFactory, progressListener, connectionParameters, cancellationToken);
        } finally {
            lock.unlock();
        }
    }
    ProgressLogger logger = progressLoggerFactory.newOperation(SynchronizedToolingImplementationLoader.class);
    logger.setDescription("Wait for the other thread to finish acquiring the distribution");
    logger.started();
    lock.lock();
    try {
        return delegate.create(distribution, progressLoggerFactory, progressListener, connectionParameters, cancellationToken);
    } finally {
        lock.unlock();
        logger.completed();
    }
}
Also used : ProgressLogger(org.gradle.internal.logging.progress.ProgressLogger)

Example 17 with ProgressLogger

use of org.gradle.internal.logging.progress.ProgressLogger in project gradle by gradle.

the class ProgressListenerToProgressLoggerAdapter method statusChanged.

@Override
public void statusChanged(ProgressEvent event) {
    String description = event.getDescription();
    if (description.equals("") || stack.size() >= 2 && stack.get(1).equals(description)) {
        loggerStack.pop().completed();
        stack.removeFirst();
        return;
    }
    stack.addFirst(description);
    ProgressLogger progressLogger = progressLoggerFactory.newOperation(ProgressListenerToProgressLoggerAdapter.class);
    progressLogger.start(description, description);
    loggerStack.push(progressLogger);
}
Also used : ProgressLogger(org.gradle.internal.logging.progress.ProgressLogger)

Example 18 with ProgressLogger

use of org.gradle.internal.logging.progress.ProgressLogger in project gradle by gradle.

the class TaskExecutionLogger method afterExecute.

public void afterExecute(Task task, TaskState state) {
    ProgressLogger currentTask = currentTasks.remove(task);
    boolean failed = state.getFailure() != null;
    String taskMessage = failed ? "FAILED" : state.getSkipMessage();
    currentTask.completed(taskMessage, failed);
}
Also used : ProgressLogger(org.gradle.internal.logging.progress.ProgressLogger)

Example 19 with ProgressLogger

use of org.gradle.internal.logging.progress.ProgressLogger in project gradle by gradle.

the class DefaultBuildOperationExecutor method createProgressLogger.

private ProgressLogger createProgressLogger(BuildOperationState currentOperation) {
    BuildOperationDescriptor descriptor = currentOperation.getDescription();
    ProgressLogger progressLogger = progressLoggerFactory.newOperation(DefaultBuildOperationExecutor.class, descriptor);
    return progressLogger.start(descriptor.getDisplayName(), descriptor.getProgressDisplayName());
}
Also used : ProgressLogger(org.gradle.internal.logging.progress.ProgressLogger)

Example 20 with ProgressLogger

use of org.gradle.internal.logging.progress.ProgressLogger in project gradle by gradle.

the class AbstractProgressLoggingHandler method createResourceOperation.

protected ResourceOperation createResourceOperation(URI resource, ResourceOperation.Type operationType, Class loggingClazz, long contentLength) {
    ProgressLogger progressLogger = progressLoggerFactory.newOperation(loggingClazz != null ? loggingClazz : getClass());
    String description = createDescription(operationType, resource);
    progressLogger.setDescription(description);
    progressLogger.setLoggingHeader(description);
    progressLogger.started();
    String resourceName = createShortDescription(resource);
    return new ResourceOperation(progressLogger, operationType, contentLength, resourceName);
}
Also used : ProgressLogger(org.gradle.internal.logging.progress.ProgressLogger)

Aggregations

ProgressLogger (org.gradle.internal.logging.progress.ProgressLogger)24 TaskAction (org.gradle.api.tasks.TaskAction)3 File (java.io.File)2 CountdownTimer (org.gradle.internal.time.CountdownTimer)2 DaemonStartupInfo (org.gradle.launcher.daemon.diagnostics.DaemonStartupInfo)2 OutputStream (java.io.OutputStream)1 ConnectException (java.net.ConnectException)1 Socket (java.net.Socket)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 GradleException (org.gradle.api.GradleException)1 InvalidUserDataException (org.gradle.api.InvalidUserDataException)1 FailFastTestListenerInternal (org.gradle.api.internal.tasks.testing.FailFastTestListenerInternal)1 NoMatchingTestsReporter (org.gradle.api.internal.tasks.testing.NoMatchingTestsReporter)1 TestExecuter (org.gradle.api.internal.tasks.testing.TestExecuter)1 TestExecutionSpec (org.gradle.api.internal.tasks.testing.TestExecutionSpec)1 TestResultProcessor (org.gradle.api.internal.tasks.testing.TestResultProcessor)1 TestClassResult (org.gradle.api.internal.tasks.testing.junit.result.TestClassResult)1