public class ProgressLogger
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
completed()
Logs the completion of the operation, with no final status
|
void |
completed(java.lang.String status)
Logs the completion of the operation, with a final status.
|
java.lang.String |
getDescription()
Returns the description of the operation.
|
java.lang.String |
getLoggingHeader()
Returns the logging header for the operation.
|
static ProgressLogger |
getProgressFactory(org.gradle.api.Project project,
java.lang.String category)
Get a Progress logger from the Gradle internal API
|
java.lang.String |
getShortDescription()
Returns the short description of the operation.
|
void |
progress(java.lang.String status)
Logs some progress, indicated by a new status.
|
ProgressLogger |
setDescription(java.lang.String description)
Sets the description of the operation.
|
ProgressLogger |
setLoggingHeader(java.lang.String header)
Sets the logging header for the operation.
|
ProgressLogger |
setShortDescription(java.lang.String description)
Sets the short description of the operation.
|
ProgressLogger |
start(java.lang.String description,
java.lang.String shortDescription)
Convenience method that sets descriptions and logs started() event.
|
void |
started()
Logs the start of the operation, with no initial status.
|
void |
started(java.lang.String status)
Logs the start of the operation, with the given status.
|
public static ProgressLogger getProgressFactory(org.gradle.api.Project project, java.lang.String category)
project - The projectcategory - The logger categorypublic java.lang.String getDescription()
public ProgressLogger setDescription(java.lang.String description)
Sets the description of the operation. This should be a full, stand-alone description of the operation.
This must be called before started().
description - The description.public java.lang.String getShortDescription()
public ProgressLogger setShortDescription(java.lang.String description)
Sets the short description of the operation. This is used in place of the full description when display space is limited.
This must be called before started()
description - The short description.public java.lang.String getLoggingHeader()
Returns the logging header for the operation. This is logged before any other log messages for this operation are logged. It is usually also logged at the end of the operation, along with the final status message. Defaults to null.
If not specified, no logging header is logged.
public ProgressLogger setLoggingHeader(java.lang.String header)
Sets the logging header for the operation. This is logged before any other log messages for this operation are logged. It is usually also logged at the end of the operation, along with the final status message. Defaults to null.
header - The header. May be empty or null.public ProgressLogger start(java.lang.String description, java.lang.String shortDescription)
public void started()
public void started(java.lang.String status)
status - The initial status message. Can be null or empty.public void progress(java.lang.String status)
status - The new status message. Can be null or empty.public void completed()
public void completed(java.lang.String status)
status - The final status message. Can be null or empty.