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 c77196cea2
commit 5be2e8e3b3

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...))
}
}