move trace log to condition
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
ef49b96583
commit
51f77581bc
@ -207,10 +207,10 @@ func (k *kBroker) Publish(ctx context.Context, topic string, msg *broker.Message
|
||||
wCtx = ctx
|
||||
}
|
||||
err = writer.WriteMessages(wCtx, kmsg)
|
||||
if k.opts.Logger.V(logger.TraceLevel) {
|
||||
k.opts.Logger.Tracef(k.opts.Context, "write message err: %v", err)
|
||||
}
|
||||
if err != nil {
|
||||
if k.opts.Logger.V(logger.TraceLevel) {
|
||||
k.opts.Logger.Tracef(k.opts.Context, "write message err: %v", err)
|
||||
}
|
||||
switch cached {
|
||||
case false:
|
||||
// non cached case, we can try to wait on some errors, but not timeout
|
||||
|
Loading…
Reference in New Issue
Block a user