From cd4f1f98d8258c0a520e2b67da63319aef687833 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Wed, 30 Nov 2016 11:51:59 -0800 Subject: [PATCH] log: mark grpc messages with module Signed-off-by: Stephen J Day --- log/grpc.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/log/grpc.go b/log/grpc.go index df6e932..4978d49 100644 --- a/log/grpc.go +++ b/log/grpc.go @@ -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)) }