From e6f82b2cabe007d28d757503552916dfc5e908a7 Mon Sep 17 00:00:00 2001 From: Mark Chmarny Date: Tue, 18 Aug 2020 14:02:28 -0700 Subject: [PATCH] clean example log entries --- example/serving/grpc/main.go | 8 ++++---- example/serving/http/main.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/serving/grpc/main.go b/example/serving/grpc/main.go index e6b5d3c9..ddd2b6e5 100644 --- a/example/serving/grpc/main.go +++ b/example/serving/grpc/main.go @@ -42,7 +42,7 @@ func main() { } func eventHandler(ctx context.Context, e *common.TopicEvent) error { - log.Printf("event - PubsubName:%s, Topic:%s, ID:%s, Data: %v", e.PubsubName, e.Topic, e.ID, e.Data) + log.Printf("event - PubsubName:%s, Topic:%s, ID:%s, Data: %s", e.PubsubName, e.Topic, e.ID, e.Data) return nil } @@ -52,8 +52,8 @@ func echoHandler(ctx context.Context, in *common.InvocationEvent) (out *common.C return } log.Printf( - "echo - ContentType:%s, Verb:%s, QueryString:%s, %+v", - in.ContentType, in.Verb, in.QueryString, string(in.Data), + "echo - ContentType:%s, Verb:%s, QueryString:%s, %s", + in.ContentType, in.Verb, in.QueryString, in.Data, ) out = &common.Content{ Data: in.Data, @@ -64,6 +64,6 @@ func echoHandler(ctx context.Context, in *common.InvocationEvent) (out *common.C } func runHandler(ctx context.Context, in *common.BindingEvent) (out []byte, err error) { - log.Printf("binding - Data:%v, Meta:%v", in.Data, in.Metadata) + log.Printf("binding - Data:%s, Meta:%v", in.Data, in.Metadata) return nil, nil } diff --git a/example/serving/http/main.go b/example/serving/http/main.go index f1893de8..952746e1 100644 --- a/example/serving/http/main.go +++ b/example/serving/http/main.go @@ -40,7 +40,7 @@ func main() { } func eventHandler(ctx context.Context, e *common.TopicEvent) error { - log.Printf("event - PubsubName:%s, Topic:%s, ID:%s, Data: %v", e.PubsubName, e.Topic, e.ID, e.Data) + log.Printf("event - PubsubName:%s, Topic:%s, ID:%s, Data: %s", e.PubsubName, e.Topic, e.ID, e.Data) return nil } @@ -50,8 +50,8 @@ func echoHandler(ctx context.Context, in *common.InvocationEvent) (out *common.C return } log.Printf( - "echo - ContentType:%s, Verb:%s, QueryString:%s, %+v", - in.ContentType, in.Verb, in.QueryString, string(in.Data), + "echo - ContentType:%s, Verb:%s, QueryString:%s, %s", + in.ContentType, in.Verb, in.QueryString, in.Data, ) out = &common.Content{ Data: in.Data, @@ -62,6 +62,6 @@ func echoHandler(ctx context.Context, in *common.InvocationEvent) (out *common.C } func runHandler(ctx context.Context, in *common.BindingEvent) (out []byte, err error) { - log.Printf("binding - Data:%v, Meta:%v", in.Data, in.Metadata) + log.Printf("binding - Data:%s, Meta:%v", in.Data, in.Metadata) return nil, nil }