Skip to content

Commit 4fd732d

Browse files
committed
add logs on event and response capture
1 parent 78f9ca2 commit 4fd732d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

proxy/proxy_handler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package proxy
22

33
import (
44
"io"
5+
"log"
56
"net/http"
67
"net/url"
78
"strings"
@@ -34,6 +35,7 @@ func getProxyHandler(urlMappingFunc func(r *http.Request) (*url.URL, error), req
3435

3536
// Send the request to the requestChannel with the copied body if the channel was provided
3637
if requestChannel != nil {
38+
log.Println("Captured lambda response", requestBodyCopy.String())
3739
r.Body = io.NopCloser(strings.NewReader(requestBodyCopy.String()))
3840
*requestChannel <- r
3941
}
@@ -57,6 +59,7 @@ func getProxyHandler(urlMappingFunc func(r *http.Request) (*url.URL, error), req
5759

5860
// Send the response to the responseChannel with the copied body if the channel was provided
5961
if responseChannel != nil {
62+
log.Println("Captured event", responseBodyCopy.String())
6063
resp.Body = io.NopCloser(strings.NewReader(responseBodyCopy.String()))
6164
*responseChannel <- resp
6265
}

0 commit comments

Comments
 (0)