diff options
Diffstat (limited to 'vendor/github.com/containers/buildah/config.go')
-rw-r--r-- | vendor/github.com/containers/buildah/config.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/containers/buildah/config.go b/vendor/github.com/containers/buildah/config.go index 99cd40208..2e942dfa0 100644 --- a/vendor/github.com/containers/buildah/config.go +++ b/vendor/github.com/containers/buildah/config.go @@ -3,6 +3,7 @@ package buildah import ( "context" "encoding/json" + "os" "runtime" "strings" "time" @@ -85,6 +86,7 @@ func (b *Builder) initConfig(ctx context.Context, img types.Image) error { } } + b.setupLogger() b.fixupConfig() return nil } @@ -114,6 +116,14 @@ func (b *Builder) fixupConfig() { } } +func (b *Builder) setupLogger() { + if b.Logger == nil { + b.Logger = logrus.New() + b.Logger.SetOutput(os.Stderr) + b.Logger.SetLevel(logrus.GetLevel()) + } +} + // Annotations returns a set of key-value pairs from the image's manifest. func (b *Builder) Annotations() map[string]string { return copyStringStringMap(b.ImageAnnotations) |