grpclogfaker should use or, not and, to check whether to log

This commit is contained in:
Jeff Mitchell 2017-11-13 15:37:00 -05:00
parent 2b78bc2a9b
commit ccfcac17fe

View file

@ -1380,19 +1380,19 @@ func (g *grpclogFaker) Fatalln(args ...interface{}) {
}
func (g *grpclogFaker) Print(args ...interface{}) {
if g.log || g.logger.IsTrace() {
if g.log && g.logger.IsTrace() {
g.logger.Trace(fmt.Sprint(args...))
}
}
func (g *grpclogFaker) Printf(format string, args ...interface{}) {
if g.log || g.logger.IsTrace() {
if g.log && g.logger.IsTrace() {
g.logger.Trace(fmt.Sprintf(format, args...))
}
}
func (g *grpclogFaker) Println(args ...interface{}) {
if g.log || g.logger.IsTrace() {
if g.log && g.logger.IsTrace() {
g.logger.Trace(fmt.Sprintln(args...))
}
}