2016-05-12 15:53:32 -07:00
|
|
|
package log
|
|
|
|
|
2016-11-30 11:51:59 -08:00
|
|
|
import (
|
2016-11-30 17:40:26 -08:00
|
|
|
"context"
|
|
|
|
|
2016-11-30 11:51:59 -08:00
|
|
|
"google.golang.org/grpc/grpclog"
|
|
|
|
)
|
2016-05-12 15:53:32 -07:00
|
|
|
|
|
|
|
func init() {
|
2016-11-30 11:51:59 -08:00
|
|
|
ctx := WithModule(context.Background(), "grpc")
|
|
|
|
|
2016-05-12 15:53:32 -07:00
|
|
|
// completely replace the grpc logger with the logrus logger.
|
2016-11-30 11:51:59 -08:00
|
|
|
grpclog.SetLogger(G(ctx))
|
2016-05-12 15:53:32 -07:00
|
|
|
}
|