Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
knqyf263 committed May 6, 2019
1 parent e25cfab commit da9ab52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions goreleaser.yml
Expand Up @@ -17,7 +17,6 @@ builds:
binary: trivy
ldflags:
- -s -w
- "-extldflags '-static'"
env:
- CGO_ENABLED=1
goos:
Expand All @@ -26,7 +25,9 @@ builds:
- amd64
- main: cmd/trivy/main.go
binary: trivy
ldflags: -s -w
ldflags:
- -s -w
- "-extldflags '-static'"
env:
- CGO_ENABLED=0
goos:
Expand Down
10 changes: 5 additions & 5 deletions pkg/log/logger.go
Expand Up @@ -3,6 +3,7 @@ package log
import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/xerrors"
)

var Logger *zap.SugaredLogger
Expand Down Expand Up @@ -45,11 +46,10 @@ func newLogger(debug bool) (*zap.SugaredLogger, error) {
OutputPaths: []string{"stdout"},
ErrorOutputPaths: []string{"stderr"},
}
logger, _ := myConfig.Build()
logger, err := myConfig.Build()
if err != nil {
return nil, xerrors.Errorf("failed to build zap config: %w", err)
}

//logger, err := zap.NewDevelopment()
//if err != nil {
// return nil, err
//}
return logger.Sugar(), nil
}

0 comments on commit da9ab52

Please sign in to comment.