Skip to content

Commit 9c89f96

Browse files
authored
Dont log on tx/rx (#70)
1 parent b1a8654 commit 9c89f96

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

pkg/dataplane/http/context.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,11 +1006,12 @@ func (c *context) sendRequest(dataPlaneInput *v3io.DataPlaneInput,
10061006
request.Header.Add(headerName, headerValue)
10071007
}
10081008

1009-
c.logger.DebugWithCtx(dataPlaneInput.Ctx,
1010-
"Tx",
1011-
"uri", uriStr,
1012-
"method", method,
1013-
"body-length", len(body))
1009+
// DONT COMMIT THIS UNCOMMENTED. This is for testing purposes only
1010+
// c.logger.DebugWithCtx(dataPlaneInput.Ctx,
1011+
// "Tx",
1012+
// "uri", uriStr,
1013+
// "method", method,
1014+
// "body-length", len(body))
10141015

10151016
if c.connSemaphore != nil {
10161017
c.connSemaphore.Acquire(goctx.TODO(), 1)
@@ -1030,16 +1031,17 @@ func (c *context) sendRequest(dataPlaneInput *v3io.DataPlaneInput,
10301031

10311032
statusCode = response.HTTPResponse.StatusCode()
10321033

1033-
{
1034-
contentLength := response.HTTPResponse.Header.ContentLength()
1035-
if contentLength < 0 {
1036-
contentLength = 0
1037-
}
1038-
c.logger.DebugWithCtx(dataPlaneInput.Ctx,
1039-
"Rx",
1040-
"statusCode", statusCode,
1041-
"Content-Length", contentLength)
1042-
}
1034+
// DONT COMMIT THIS UNCOMMENTED. This is for testing purposes only
1035+
// {
1036+
// contentLength := response.HTTPResponse.Header.ContentLength()
1037+
// if contentLength < 0 {
1038+
// contentLength = 0
1039+
// }
1040+
// c.logger.DebugWithCtx(dataPlaneInput.Ctx,
1041+
// "Rx",
1042+
// "statusCode", statusCode,
1043+
// "Content-Length", contentLength)
1044+
// }
10431045

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

0 commit comments

Comments
 (0)