add debug logs
This commit is contained in:
parent
415039292b
commit
b513302120
|
@ -51,6 +51,10 @@ func (s Server) Subscribe(subject string, cb nats.MsgHandler) (*nats.Subscriptio
|
|||
return nil, errors.New(msg)
|
||||
}
|
||||
|
||||
if s.cfg.Debug {
|
||||
fmt.Printf("[natsio.Server] subscribe to subject #%s \n", subject)
|
||||
}
|
||||
|
||||
return sub, nil
|
||||
}
|
||||
|
||||
|
@ -62,5 +66,9 @@ func (s Server) QueueSubscribe(subject, queue string, cb nats.MsgHandler) (*nats
|
|||
return nil, errors.New(msg)
|
||||
}
|
||||
|
||||
if s.cfg.Debug {
|
||||
fmt.Printf("[natsio.Server] queue subscribe to subject #%s \n", subject)
|
||||
}
|
||||
|
||||
return sub, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue