MCPcopy Create free account
hub / github.com/imroc/req / SetLogger

Method SetLogger

client.go:578–585  ·  view source on GitHub ↗

SetLogger set the customized logger for client, will disable log if set to nil.

(log Logger)

Source from the content-addressed store, hash-verified

576
577// SetLogger set the customized logger for client, will disable log if set to nil.
578func (c *Client) SetLogger(log Logger) *Client {
579 if log == nil {
580 c.log = &disableLogger{}
581 return c
582 }
583 c.log = log
584 return c
585}
586
587// SetTimeout set timeout for requests fired from the client.
588func (c *Client) SetTimeout(d time.Duration) *Client {

Callers 5

TestLoggerFunction · 0.80
TestSetLoggerFunction · 0.80
TestSetFileFunction · 0.80
SetLoggerFunction · 0.80

Calls

no outgoing calls

Tested by 4

TestLoggerFunction · 0.64
TestSetLoggerFunction · 0.64
TestSetFileFunction · 0.64