|
|
|
@ -249,11 +249,11 @@ func newLoggingReadCloser(rc io.ReadCloser, ctx context.Context, c *CurlRT) io.R
|
|
|
|
if c.ctxLogger == nil {
|
|
|
|
if c.ctxLogger == nil {
|
|
|
|
buf = &bytes.Buffer{}
|
|
|
|
buf = &bytes.Buffer{}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cap := c.maxStreamLogBytes
|
|
|
|
ca := c.maxStreamLogBytes
|
|
|
|
if cap <= 0 {
|
|
|
|
if ca <= 0 {
|
|
|
|
cap = 8192
|
|
|
|
ca = 8192
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return &loggingReadCloser{rc: rc, ctx: ctx, l: c.logger, cl: c.ctxLogger, cap: cap, summary: buf}
|
|
|
|
return &loggingReadCloser{rc: rc, ctx: ctx, l: c.logger, cl: c.ctxLogger, cap: ca, summary: buf}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (lrc *loggingReadCloser) Read(p []byte) (int, error) {
|
|
|
|
func (lrc *loggingReadCloser) Read(p []byte) (int, error) {
|
|
|
|
|