Skip to content

Commit

Permalink
clean example log entries
Browse files Browse the repository at this point in the history
  • Loading branch information
mchmarny committed Aug 18, 2020
1 parent 79e0f55 commit e6f82b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions example/serving/grpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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,
Expand All @@ -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
}
8 changes: 4 additions & 4 deletions example/serving/http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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,
Expand All @@ -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
}

0 comments on commit e6f82b2

Please sign in to comment.