Skip to content

Commit

Permalink
增加错误的日志打印
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jul 12, 2024
1 parent f8faf2b commit 55a79a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rabbitConsumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/farseer-go/fs/asyncLocal"
"github.com/farseer-go/fs/exception"
"github.com/farseer-go/fs/flog"
"github.com/farseer-go/fs/trace"
amqp "github.com/rabbitmq/amqp091-go"
"time"
)
Expand Down Expand Up @@ -197,6 +198,9 @@ func (receiver *rabbitConsumer) SubscribeBatchAck(queueName string, routingKey s
}
}
}).CatchException(func(exp any) {
if file, funcName, line := trace.GetCallerInfo(); file != "" {
_ = flog.Errorf("%s:%s %s \n", file, flog.Blue(line), funcName)
}
entryMqConsumer.Error(flog.Errorf("rabbit:SubscribeBatchAck exception %s:%s", queueName, exp))
})
if !isSuccess {
Expand Down

0 comments on commit 55a79a6

Please sign in to comment.