Skip to content

Commit

Permalink
Rename global
Browse files Browse the repository at this point in the history
  • Loading branch information
ash2k committed Feb 4, 2021
1 parent c83c545 commit aba3594
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zapgrpc/zapgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const (
)

var (
// grpc2zapLvl maps gRPC log levels to zap log levels.
// _grpcToZapLevel maps gRPC log levels to zap log levels.
// See https://pkg.go.dev/go.uber.org/zap@v1.16.0/zapcore#Level
grpc2zapLvl = map[int]zapcore.Level{
_grpcToZapLevel = map[int]zapcore.Level{
grpcLvlInfo: zapcore.InfoLevel,
grpcLvlWarn: zapcore.WarnLevel,
grpcLvlError: zapcore.ErrorLevel,
Expand Down Expand Up @@ -182,7 +182,7 @@ func (l *Logger) Fatalf(format string, args ...interface{}) {

// V implements grpclog.LoggerV2.
func (l *Logger) V(level int) bool {
return l.delegate.Desugar().Core().Enabled(grpc2zapLvl[level])
return l.delegate.Desugar().Core().Enabled(_grpcToZapLevel[level])
}

// addSpaces always adds spaces between arguments like https://golang.org/pkg/fmt/#Println
Expand Down

0 comments on commit aba3594

Please sign in to comment.