mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Make HTTP output less verbose
It will act same with —debug flag
This commit is contained in:
+8
-1
@@ -173,7 +173,9 @@ func (o *HTTPOutput) Write(data []byte) (n int, err error) {
|
||||
func (o *HTTPOutput) Read(data []byte) (int, error) {
|
||||
resp := <-o.responses
|
||||
|
||||
Debug("[OUTPUT-HTTP] Received response:", string(resp.payload))
|
||||
if Settings.debug {
|
||||
Debug("[OUTPUT-HTTP] Received response:", string(resp.payload))
|
||||
}
|
||||
|
||||
header := payloadHeader(ReplayedResponsePayload, resp.uuid, resp.roundTripTime, resp.startedAt)
|
||||
copy(data[0:len(header)], header)
|
||||
@@ -184,6 +186,11 @@ func (o *HTTPOutput) Read(data []byte) (int, error) {
|
||||
|
||||
func (o *HTTPOutput) sendRequest(client *HTTPClient, request []byte) {
|
||||
meta := payloadMeta(request)
|
||||
|
||||
if Settings.debug {
|
||||
Debug(meta)
|
||||
}
|
||||
|
||||
if len(meta) < 2 {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user