improved logging in callbacks
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
"github.com/tech/sendico/pkg/mutil/mzap"
|
||||
moneyv1 "github.com/tech/sendico/pkg/proto/common/money/v1"
|
||||
endpointv1 "github.com/tech/sendico/pkg/proto/payments/endpoint/v1"
|
||||
quotationv2 "github.com/tech/sendico/pkg/proto/payments/quotation/v2"
|
||||
@@ -33,7 +34,7 @@ type quoteIntentLogSummary struct {
|
||||
|
||||
func (s *QuotationServiceV2) quotePaymentLogger(req *quotationv2.QuotePaymentRequest) mlogger.Logger {
|
||||
return s.logger.With(
|
||||
zap.String("flow_ref", bson.NewObjectID().Hex()),
|
||||
mzap.ObjRef("flow_ref", bson.NewObjectID()),
|
||||
zap.String("rpc_method", "QuotePayment"),
|
||||
zap.String("organization_ref", strings.TrimSpace(req.GetMeta().GetOrganizationRef())),
|
||||
zap.String("idempotency_key", strings.TrimSpace(req.GetIdempotencyKey())),
|
||||
@@ -44,7 +45,7 @@ func (s *QuotationServiceV2) quotePaymentLogger(req *quotationv2.QuotePaymentReq
|
||||
|
||||
func (s *QuotationServiceV2) quotePaymentsLogger(req *quotationv2.QuotePaymentsRequest) mlogger.Logger {
|
||||
return s.logger.With(
|
||||
zap.String("flow_ref", bson.NewObjectID().Hex()),
|
||||
mzap.ObjRef("flow_ref", bson.NewObjectID()),
|
||||
zap.String("rpc_method", "QuotePayments"),
|
||||
zap.String("organization_ref", strings.TrimSpace(req.GetMeta().GetOrganizationRef())),
|
||||
zap.String("idempotency_key", strings.TrimSpace(req.GetIdempotencyKey())),
|
||||
|
||||
Reference in New Issue
Block a user