mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
优化kafkamoudule日志
This commit is contained in:
@@ -248,7 +248,7 @@ func (ch *ConsumerGroupHandler) ConsumeClaim(session sarama.ConsumerGroupSession
|
|||||||
select {
|
select {
|
||||||
case msg := <-claim.Messages():
|
case msg := <-claim.Messages():
|
||||||
if msg == nil {
|
if msg == nil {
|
||||||
log.SWarning("claim will exit", log.Any("topic", claim.Topic()), log.Any("Partition", claim.Partition()))
|
log.SWarn("claim will exit", log.Any("topic", claim.Topic()), log.Any("Partition", claim.Partition()))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
ch.AppendMsg(session, msg)
|
ch.AppendMsg(session, msg)
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ func (p *Producer) asyncRun() {
|
|||||||
asyncReturn := sm.Metadata.(*AsyncReturn)
|
asyncReturn := sm.Metadata.(*AsyncReturn)
|
||||||
asyncReturn.chanReturn <- asyncReturn
|
asyncReturn.chanReturn <- asyncReturn
|
||||||
case em := <-p.Errors():
|
case em := <-p.Errors():
|
||||||
log.Error("async kafkamodule error", log.ErrorAttr("err", em.Err))
|
log.Error("async kafkamodule error", log.ErrorField("err", em.Err))
|
||||||
if em.Msg.Metadata == nil {
|
if em.Msg.Metadata == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user