Skip to content

Commit

Permalink
Add Client.Logger() to expose internal logger (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Jul 6, 2022
1 parent 696fa94 commit 56b46b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,15 @@ func (c *Client) EnableHTTP3() *Client {
return c
}

// Logger return the internal logger, usually used in middleware.
func (c *Client) Logger() Logger {
if c.log != nil {
return c.log
}
c.log = createDefaultLogger()
return c.log
}

// NewClient is the alias of C
func NewClient() *Client {
return C()
Expand Down

0 comments on commit 56b46b9

Please sign in to comment.