Skip to content

Commit

Permalink
add logger to client
Browse files Browse the repository at this point in the history
  • Loading branch information
vetcher committed Mar 28, 2018
1 parent fa39a87 commit 8dd7603
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 @@ -274,3 +274,12 @@ type Publish struct {
Immediate bool
Priority uint8
}

// WithLogger set logger for client, which will report declaration problems and so on.
type WithLogger struct {
logger.Logger
}

func (b WithLogger) declare(c *Client) {
c.logger = b.Logger
}

0 comments on commit 8dd7603

Please sign in to comment.