Skip to content

Commit

Permalink
++ lint
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
  • Loading branch information
diafour authored and distorhead committed May 19, 2023
1 parent 3a7506c commit a96c012
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
21 changes: 2 additions & 19 deletions cmd/werf/render/render.go
Expand Up @@ -336,27 +336,10 @@ func runRender(ctx context.Context, imagesToProcess build.ImagesToProcess) error

// Print build logs on error by default.
// Always print logs if --log-verbose is specified (level.Info).
deferLog := true
if logboek.Context(ctx).IsAcceptedLevel(level.Default) {
deferLog = false
}
if err := logging.RunWithDeferredLog(ctx, deferLog, buildFunc); err != nil {
isVerbose := logboek.Context(ctx).IsAcceptedLevel(level.Default)
if err := logging.RunWithDeferredLog(ctx, !isVerbose, buildFunc); err != nil {
return err
}
//if logboek.Context(ctx).IsAcceptedLevel(level.Default) {
// if err := buildFunc(ctx); err != nil {
// return err
// }
//} else {
// buf := new(bytes.Buffer)
// bufLogger := logboek.NewLogger(buf, buf)
// ctxWithBufLogger := logboek.NewContext(ctx, bufLogger)
//
// if err := buildFunc(ctxWithBufLogger); err != nil {
// fmt.Println(buf.String())
// return err
// }
//}

imagesInfoGetters, err = c.GetImageInfoGetters(image.InfoGetterOptions{CustomTagFunc: useCustomTagFunc})
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/logging/main.go
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"

"github.com/gookit/color"

"github.com/werf/logboek"
)

Expand Down

0 comments on commit a96c012

Please sign in to comment.