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

Method GetLogger

client.go:569–575  ·  view source on GitHub ↗

GetLogger return the internal logger, usually used in middleware.

()

Source from the content-addressed store, hash-verified

567
568// GetLogger return the internal logger, usually used in middleware.
569func (c *Client) GetLogger() Logger {
570 if c.log != nil {
571 return c.log
572 }
573 c.log = createDefaultLogger()
574 return c.log
575}
576
577// SetLogger set the customized logger for client, will disable log if set to nil.
578func (c *Client) SetLogger(log Logger) *Client {

Callers

nothing calls this directly

Calls 1

createDefaultLoggerFunction · 0.85

Tested by

no test coverage detected