chore_: better community json log (#5118)
This commit is contained in:
parent
2d6ddf733d
commit
1c43b7a29b
|
@ -6,7 +6,6 @@ import (
|
|||
"crypto/ecdsa"
|
||||
"database/sql"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
|
@ -5428,12 +5427,11 @@ func (m *Manager) encryptCommunityDescriptionImpl(groupID []byte, d *protobuf.Co
|
|||
return "", nil, err
|
||||
}
|
||||
|
||||
communityJSON, err := json.Marshal(d)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
m.logger.Debug("encrypting community description",
|
||||
zap.Any("community", d),
|
||||
zap.String("groupID", types.Bytes2Hex(groupID)),
|
||||
zap.String("keyID", types.Bytes2Hex(keyID)))
|
||||
|
||||
m.logger.Debug("encrypting community description", zap.String("community", string(communityJSON)), zap.String("groupID", types.Bytes2Hex(groupID)), zap.String("key-id", types.Bytes2Hex(keyID)))
|
||||
keyIDSeqNo := fmt.Sprintf("%s%d", hex.EncodeToString(keyID), newSeqNo)
|
||||
|
||||
return keyIDSeqNo, encryptedPayload, nil
|
||||
|
|
|
@ -109,11 +109,12 @@ func (m *Messenger) publishOrg(org *communities.Community, shouldRekey bool) err
|
|||
return nil
|
||||
}
|
||||
|
||||
communityJSON, err := json.Marshal(org)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.logger.Debug("publishing org", zap.String("org-id", org.IDString()), zap.Uint64("clock", org.Clock()), zap.String("org", string(communityJSON)))
|
||||
m.logger.Debug("publishing community",
|
||||
zap.Uint64("clock", org.Clock()),
|
||||
zap.String("communityID", org.IDString()),
|
||||
zap.Any("community", org),
|
||||
)
|
||||
|
||||
payload, err := org.MarshaledDescription()
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue