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();
}
}
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);
}
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);
}
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());
}
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);
}
Aggregations