Discard grpc logs by default

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-06-14 11:58:13 -07:00
parent 709ba260de
commit c9064df2cf
2 changed files with 5 additions and 11 deletions

View File

@@ -1,14 +1,12 @@
package log
import (
"context"
"io/ioutil"
"log"
"google.golang.org/grpc/grpclog"
)
func init() {
ctx := WithModule(context.Background(), "grpc")
// completely replace the grpc logger with the logrus logger.
grpclog.SetLogger(G(ctx))
grpclog.SetLogger(log.New(ioutil.Discard, "", log.LstdFlags))
}