MCPcopy
hub / github.com/minio/minio-go / TraceOn

Method TraceOn

api.go:368–378  ·  view source on GitHub ↗

TraceOn enables HTTP request and response tracing for debugging purposes. All HTTP traffic will be written to the provided output stream. Parameters: - outputStream: Writer where trace output will be written (defaults to os.Stdout if nil)

(outputStream io.Writer)

Source from the content-addressed store, hash-verified

366// Parameters:
367// - outputStream: Writer where trace output will be written (defaults to os.Stdout if nil)
368func (c *Client) TraceOn(outputStream io.Writer) {
369 // if outputStream is nil then default to os.Stdout.
370 if outputStream == nil {
371 outputStream = os.Stdout
372 }
373 // Sets a new output stream.
374 c.traceOutput = outputStream
375
376 // Enable tracing.
377 c.isTraceEnabled = true
378}
379
380// TraceErrorsOnlyOn enables HTTP tracing but only for requests that result in errors.
381// This is useful for debugging without the overhead of tracing all requests.

Callers 5

TraceErrorsOnlyOnMethod · 0.95
NewClientFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected