improved logging in callbacks
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/tech/sendico/edge/callbacks/internal/storage"
|
||||
"github.com/tech/sendico/pkg/merrors"
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
"github.com/tech/sendico/pkg/mutil/mzap"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@@ -45,7 +46,7 @@ func (s *service) Resolve(ctx context.Context, eventType string, organizationRef
|
||||
if err != nil {
|
||||
s.logger.Warn("Failed to resolve active endpoints",
|
||||
zap.String("event_type", eventType),
|
||||
zap.String("organization_ref", organizationRef.Hex()),
|
||||
mzap.ObjRef("organization_ref", organizationRef),
|
||||
zap.Error(err),
|
||||
)
|
||||
return nil, err
|
||||
@@ -53,7 +54,7 @@ func (s *service) Resolve(ctx context.Context, eventType string, organizationRef
|
||||
|
||||
s.logger.Debug("Resolved active endpoints",
|
||||
zap.String("event_type", eventType),
|
||||
zap.String("organization_ref", organizationRef.Hex()),
|
||||
mzap.ObjRef("organization_ref", organizationRef),
|
||||
zap.Int("endpoints", len(endpoints)),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user