log: mark grpc messages with module

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2016-11-30 11:51:59 -08:00
parent deb62729ba
commit cd4f1f98d8
1 changed files with 7 additions and 2 deletions

View File

@ -1,8 +1,13 @@
package log
import "google.golang.org/grpc/grpclog"
import (
"golang.org/x/net/context"
"google.golang.org/grpc/grpclog"
)
func init() {
ctx := WithModule(context.Background(), "grpc")
// completely replace the grpc logger with the logrus logger.
grpclog.SetLogger(L)
grpclog.SetLogger(G(ctx))
}