Skip to content

zapgrpc: verbosity level check is incorrect #1544

@axw

Description

@axw

grpclog has two concepts of log level: severity level, and verbosity level.
Severity level is analogous to the zap logger level, verbosity is supplemental.

The LoggerV2.V is documented as follows:

	// V reports whether verbosity level l is at least the requested verbose level.
	V(l int) bool

The zapgrpc implementation confuses verbosity level for severity level:

zap/zapgrpc/zapgrpc.go

Lines 234 to 237 in 0ab0d5a

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions