org.gradle
Class TaskExecutionLogger
java.lang.Object
org.gradle.TaskExecutionLogger
- All Implemented Interfaces:
- TaskExecutionListener
public class TaskExecutionLogger
- extends Object
- implements TaskExecutionListener
A listener which logs the execution of tasks.
Constructor Summary |
TaskExecutionLogger(org.gradle.logging.ProgressLoggerFactory progressLoggerFactory)
|
Method Summary |
void |
afterExecute(Task task,
TaskState state)
This method is call immediately after a task has been executed. |
void |
beforeExecute(Task task)
This method is called immediately before a task is executed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaskExecutionLogger
public TaskExecutionLogger(org.gradle.logging.ProgressLoggerFactory progressLoggerFactory)
beforeExecute
public void beforeExecute(Task task)
- Description copied from interface:
TaskExecutionListener
- This method is called immediately before a task is executed.
- Specified by:
beforeExecute
in interface TaskExecutionListener
- Parameters:
task
- The task about to be executed. Never null.
afterExecute
public void afterExecute(Task task,
TaskState state)
- Description copied from interface:
TaskExecutionListener
- This method is call immediately after a task has been executed. It is always called, regardless of whether the
task completed successfully, or failed with an exception.
- Specified by:
afterExecute
in interface TaskExecutionListener
- Parameters:
task
- The task which was executed. Never null.state
- The task state. If the task failed with an exception, the exception is available in this
state. Never null.