Skip to content

Commit

Permalink
fix: improve tyber logs
Browse files Browse the repository at this point in the history
Signed-off-by: D4ryl00 <d4ryl00@gmail.com>
  • Loading branch information
D4ryl00 committed Jun 10, 2022
1 parent a76a279 commit 1285c3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions go/pkg/bertyprotocol/api_contactrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ func (s *service) ContactRequestSend(ctx context.Context, req *protocoltypes.Con
ctx, _, endSection := tyber.Section(ctx, s.logger, "Sending contact request")
defer func() { endSection(err, "") }()

s.logger.Debug("Contact request info", tyber.FormatStepLogFields(ctx, []tyber.Detail{}, tyber.WithJSONDetail("Request", req))...)

shareableContact := req.Contact
if shareableContact == nil {
return nil, errcode.ErrInvalidInput
Expand Down
3 changes: 2 additions & 1 deletion go/pkg/bertyprotocol/store_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ func (m *MetadataStore) ContactRequestReferenceReset(ctx context.Context) (opera
func (m *MetadataStore) ContactRequestOutgoingEnqueue(ctx context.Context, contact *protocoltypes.ShareableContact, ownMetadata []byte) (operation.Operation, error) {
ctx, _ = tyber.ContextWithTraceID(ctx)

m.logger.Debug("Enqueuing contact request", tyber.FormatStepLogFields(ctx, []tyber.Detail{})...)
b64GroupPK := base64.RawURLEncoding.EncodeToString(m.g.PublicKey)
m.logger.Debug("Enqueuing contact request", tyber.FormatStepLogFields(ctx, []tyber.Detail{{Name: "GroupPK", Description: fmt.Sprint(b64GroupPK)}})...)

if !m.typeChecker(isAccountGroup) {
return nil, errcode.ErrGroupInvalidType
Expand Down

0 comments on commit 1285c3e

Please sign in to comment.