cmd/containerd: set correct module on interceptor for content

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-02-28 16:47:10 -08:00
parent 317b884110
commit 0c00d4a64c
No known key found for this signature in database
GPG key ID: 67B3DED84EDC823F

View file

@ -16,6 +16,7 @@ import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/containerd" "github.com/docker/containerd"
contentapi "github.com/docker/containerd/api/services/content"
api "github.com/docker/containerd/api/services/execution" api "github.com/docker/containerd/api/services/execution"
"github.com/docker/containerd/content" "github.com/docker/containerd/content"
"github.com/docker/containerd/log" "github.com/docker/containerd/log"
@ -306,7 +307,9 @@ func interceptor(ctx gocontext.Context,
ctx = log.WithModule(ctx, "containerd") ctx = log.WithModule(ctx, "containerd")
switch info.Server.(type) { switch info.Server.(type) {
case api.ContainerServiceServer: case api.ContainerServiceServer:
ctx = log.WithModule(global, "execution") ctx = log.WithModule(ctx, "execution")
case contentapi.ContentServer:
ctx = log.WithModule(ctx, "content")
default: default:
fmt.Printf("unknown GRPC server type: %#v\n", info.Server) fmt.Printf("unknown GRPC server type: %#v\n", info.Server)
} }