Skip to content

Commit 8dd7603

Browse files
committed
add logger to client
1 parent fa39a87 commit 8dd7603

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

client.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,12 @@ type Publish struct {
274274
Immediate bool
275275
Priority uint8
276276
}
277+
278+
// WithLogger set logger for client, which will report declaration problems and so on.
279+
type WithLogger struct {
280+
logger.Logger
281+
}
282+
283+
func (b WithLogger) declare(c *Client) {
284+
c.logger = b.Logger
285+
}

0 commit comments

Comments
 (0)