Skip to content

Commit

Permalink
Dont log on tx/rx (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavius committed Aug 6, 2020
1 parent 9a94144 commit 0007b5e
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions pkg/dataplane/http/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,11 +998,12 @@ func (c *context) sendRequest(dataPlaneInput *v3io.DataPlaneInput,
request.Header.Add(headerName, headerValue)
}

c.logger.DebugWithCtx(dataPlaneInput.Ctx,
"Tx",
"uri", uriStr,
"method", method,
"body-length", len(body))
// DONT COMMIT THIS UNCOMMENTED. This is for testing purposes only
// c.logger.DebugWithCtx(dataPlaneInput.Ctx,
// "Tx",
// "uri", uriStr,
// "method", method,
// "body-length", len(body))

if c.connSemaphore != nil {
c.connSemaphore.Acquire(goctx.TODO(), 1)
Expand All @@ -1022,16 +1023,17 @@ func (c *context) sendRequest(dataPlaneInput *v3io.DataPlaneInput,

statusCode = response.HTTPResponse.StatusCode()

{
contentLength := response.HTTPResponse.Header.ContentLength()
if contentLength < 0 {
contentLength = 0
}
c.logger.DebugWithCtx(dataPlaneInput.Ctx,
"Rx",
"statusCode", statusCode,
"Content-Length", contentLength)
}
// DONT COMMIT THIS UNCOMMENTED. This is for testing purposes only
// {
// contentLength := response.HTTPResponse.Header.ContentLength()
// if contentLength < 0 {
// contentLength = 0
// }
// c.logger.DebugWithCtx(dataPlaneInput.Ctx,
// "Rx",
// "statusCode", statusCode,
// "Content-Length", contentLength)
// }

// did we get a 2xx response?
success = statusCode >= 200 && statusCode < 300
Expand Down

0 comments on commit 0007b5e

Please sign in to comment.