Package net.fabricmc.loom.util.gradle
Class ProgressLogger
java.lang.Object
net.fabricmc.loom.util.gradle.ProgressLogger
Wrapper to ProgressLogger internal API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidLogs the completion of the operation, with no final status.voidLogs the completion of the operation, with a final status.Returns the description of the operation.Returns the logging header for the operation.static ProgressLoggergetProgressFactory(org.gradle.api.Project project, String category)Get a Progress logger from the Gradle internal API.Returns the short description of the operation.voidLogs some progress, indicated by a new status.setDescription(String description)Sets the description of the operation.setLoggingHeader(String header)Sets the logging header for the operation.setShortDescription(String description)Sets the short description of the operation.Convenience method that sets descriptions and logs started() event.voidstarted()Logs the start of the operation, with no initial status.voidLogs the start of the operation, with the given status.
-
Method Details
-
getProgressFactory
Get a Progress logger from the Gradle internal API.- Parameters:
project- The projectcategory- The logger category- Returns:
- In any case a progress logger
-
getDescription
Returns the description of the operation.- Returns:
- the description, must not be empty.
-
setDescription
Sets the description of the operation. This should be a full, stand-alone description of the operation.This must be called before
started()- Parameters:
description- The description.
-
getShortDescription
Returns the short description of the operation. This is used in place of the full description when display space is limited.- Returns:
- The short description, must not be empty.
-
setShortDescription
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()- Parameters:
description- The short description.
-
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.
- Returns:
- The logging header, possibly empty.
-
setLoggingHeader
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.- Parameters:
header- The header. May be empty or null.
-
start
Convenience method that sets descriptions and logs started() event.- Returns:
- this logger instance
-
started
public void started()Logs the start of the operation, with no initial status. -
started
Logs the start of the operation, with the given status.- Parameters:
status- The initial status message. Can be null or empty.
-
progress
Logs some progress, indicated by a new status.- Parameters:
status- The new status message. Can be null or empty.
-
completed
public void completed()Logs the completion of the operation, with no final status. -
completed
Logs the completion of the operation, with a final status. This is generally logged along with the description.- Parameters:
status- The final status message. Can be null or empty.
-