From 5b1b0d27ca424f98f1a6c8ae43b5a462861a0ed2 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 3 Dec 2021 09:27:53 -0500 Subject: [PATCH] Wire logger through to config Currently we are only wiring the logger into run_linux.go Not into the Config section. This PR is needed in order to update vendor in Podman. https://github.com/containers/podman/pull/12375 [NO NEW TESTS NEEDED] Tests will be done in Podman. Signed-off-by: Daniel J Walsh --- buildah.go | 2 ++ imagebuildah/stage_executor.go | 1 + new.go | 1 + 3 files changed, 4 insertions(+) diff --git a/buildah.go b/buildah.go index f760d252767..558cd9f41c1 100644 --- a/buildah.go +++ b/buildah.go @@ -271,6 +271,8 @@ type BuilderOptions struct { // to store copies of layer blobs that we pull down, if any. It should // already exist. BlobDirectory string + // Logger is the logrus logger to write log messages with + Logger *logrus.Logger `json:"-"` // Mount signals to NewBuilder() that the container should be mounted // immediately. Mount bool diff --git a/imagebuildah/stage_executor.go b/imagebuildah/stage_executor.go index 414b01f96b8..7a85cb88e92 100644 --- a/imagebuildah/stage_executor.go +++ b/imagebuildah/stage_executor.go @@ -558,6 +558,7 @@ func (s *StageExecutor) prepare(ctx context.Context, from string, initializeIBCo MaxPullRetries: s.executor.maxPullPushRetries, PullRetryDelay: s.executor.retryPullPushDelay, OciDecryptConfig: s.executor.ociDecryptConfig, + Logger: s.executor.logger, } builder, err = buildah.NewBuilder(ctx, s.executor.store, builderOptions) diff --git a/new.go b/new.go index 85a0f0b31b0..d25eb4959e0 100644 --- a/new.go +++ b/new.go @@ -290,6 +290,7 @@ func newBuilder(ctx context.Context, store storage.Store, options BuilderOptions Format: options.Format, TempVolumes: map[string]bool{}, Devices: options.Devices, + Logger: options.Logger, } if options.Mount {