#17 Enable use of MQTT broker as a library -> passing a logger reference to the broker instance

This commit is contained in:
Marc Magnin
2018-02-08 11:13:50 +01:00
parent 148dbbb23c
commit d52d8dda07
4 changed files with 24 additions and 29 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ type Broker struct {
queues map[string]int
}
func NewBroker(config *Config) (*Broker, error) {
func NewBroker(config *Config, logger *zap.Logger) (*Broker, error) {
log = logger
b := &Broker{
id: GenUniqueId(),
config: config,