Skip to content

Commit 55c85f6

Browse files
committed
Log the response body when debugging the API
1 parent 6a51a6b commit 55c85f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/aws/albsession/session.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ func NewSession(awsconfig *aws.Config, AWSDebug bool, mc metric.Collector, cc *c
4747
if AWSDebug {
4848
glog.ErrorDepth(4, fmt.Sprintf("Failed request: %s/%s, Payload: %s, Error: %s", r.ClientInfo.ServiceName, r.Operation.Name, log.Prettify(r.Params), r.Error))
4949
}
50+
} else {
51+
if AWSDebug {
52+
glog.InfoDepth(4, fmt.Sprintf("Response: %s/%s, Body: %s", r.ClientInfo.ServiceName, r.Operation.Name, log.Prettify(r.Body)))
53+
}
5054
}
5155
})
5256
return session

0 commit comments

Comments
 (0)