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