Interface BuildLog
- All Known Implementing Classes:
AbstractBuildLog
public interface BuildLog
Callback interface used to provide
Builder
output logging.- Since:
- 2.3.0
- Author:
- Phillip Webb, Scott Frederick, Andrey Shlykov, Rafael Ceccone
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
executedLifecycle
(BuildRequest request) Log that the lifecycle has executed.void
executingLifecycle
(BuildRequest request, org.springframework.boot.buildpack.platform.build.LifecycleVersion version, Cache buildCache) Log that the lifecycle is executing.void
executingLifecycle
(BuildRequest request, org.springframework.boot.buildpack.platform.build.LifecycleVersion version, VolumeName buildCacheVolume) Log that the lifecycle is executing.void
failedCleaningWorkDir
(Cache cache, Exception exception) Log that a cache cleanup step was not completed successfully.void
pulledImage
(Image image, org.springframework.boot.buildpack.platform.build.ImageType imageType) Log that an image has been pulled.pullingImage
(ImageReference imageReference, org.springframework.boot.buildpack.platform.build.ImageType imageType) Log that an image is being pulled.void
pushedImage
(ImageReference imageReference) Log that an image has been pushed.pushingImage
(ImageReference imageReference) Log that an image is being pushed.runningPhase
(BuildRequest request, String name) Log that a specific phase is running.void
skippingPhase
(String name, String reason) Log that a specific phase is being skipped.void
start
(BuildRequest request) Log that a build is starting.void
Log that a tag has been created.static BuildLog
to
(PrintStream out) Factory method that returns aBuildLog
the outputs to a givenPrintStream
.static BuildLog
Factory method that returns aBuildLog
the outputs toSystem.out
.
-
Method Details
-
start
Log that a build is starting.- Parameters:
request
- the build request
-
pullingImage
Consumer<TotalProgressEvent> pullingImage(ImageReference imageReference, org.springframework.boot.buildpack.platform.build.ImageType imageType) Log that an image is being pulled.- Parameters:
imageReference
- the image referenceimageType
- the image type- Returns:
- a consumer for progress update events
-
pulledImage
void pulledImage(Image image, org.springframework.boot.buildpack.platform.build.ImageType imageType) Log that an image has been pulled.- Parameters:
image
- the image that was pulledimageType
- the image type that was pulled
-
pushingImage
Log that an image is being pushed.- Parameters:
imageReference
- the image reference- Returns:
- a consumer for progress update events
-
pushedImage
Log that an image has been pushed.- Parameters:
imageReference
- the image reference
-
executingLifecycle
void executingLifecycle(BuildRequest request, org.springframework.boot.buildpack.platform.build.LifecycleVersion version, VolumeName buildCacheVolume) Log that the lifecycle is executing.- Parameters:
request
- the build requestversion
- the lifecycle versionbuildCacheVolume
- the name of the build cache volume in use
-
executingLifecycle
void executingLifecycle(BuildRequest request, org.springframework.boot.buildpack.platform.build.LifecycleVersion version, Cache buildCache) Log that the lifecycle is executing.- Parameters:
request
- the build requestversion
- the lifecycle versionbuildCache
- the build cache in use
-
runningPhase
Log that a specific phase is running.- Parameters:
request
- the build requestname
- the name of the phase- Returns:
- a consumer for log updates
-
skippingPhase
Log that a specific phase is being skipped.- Parameters:
name
- the name of the phasereason
- the reason the phase is skipped
-
executedLifecycle
Log that the lifecycle has executed.- Parameters:
request
- the build request
-
taggedImage
Log that a tag has been created.- Parameters:
tag
- the tag reference
-
failedCleaningWorkDir
Log that a cache cleanup step was not completed successfully.- Parameters:
cache
- the cacheexception
- any exception that caused the failure- Since:
- 3.2.6
-
toSystemOut
Factory method that returns aBuildLog
the outputs toSystem.out
.- Returns:
- a build log instance that logs to system out
-
to
Factory method that returns aBuildLog
the outputs to a givenPrintStream
.- Parameters:
out
- the print stream used to output the log- Returns:
- a build log instance that logs to the given print stream
-