File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ func main() {
59
59
// Send that Event.
60
60
if result := c.Send (ctx, event); cloudevents.IsUndelivered (result) {
61
61
log.Fatalf (" failed to send, %v " , result)
62
+ } else {
63
+ log.Printf (" sent: %v " , event)
64
+ log.Printf (" result: %v " , result)
62
65
}
63
66
}
64
67
```
@@ -89,10 +92,11 @@ func main() {
89
92
func handler (w http .ResponseWriter , r *http .Request ) {
90
93
event , err := cloudevents.NewEventFromHTTPRequest (r)
91
94
if err != nil {
92
- log.Print (" failed to parse CloudEvent from request: %v " , err)
95
+ log.Printf (" failed to parse CloudEvent from request: %v " , err)
93
96
http.Error (w, http.StatusText (http.StatusBadRequest ), http.StatusBadRequest )
94
97
}
95
- w.Write ([]byte (*event.String ()))
98
+ w.Write ([]byte (event.String ()))
99
+ log.Println (event.String ())
96
100
}
97
101
```
98
102
You can’t perform that action at this time.
0 commit comments