Discard grpc logs by default
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
Reference in New Issue
Block a user