Skip to content

Commit db2ad17

Browse files
committedOct 29, 2019
chore: don't log buffers in trace lgos
1 parent 70ade59 commit db2ad17

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎docs/api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ Human readable event representation
613613
| --- | --- | --- |
614614
| topicCID | <code>string</code> | |
615615
| author | <code>string</code> | The event author base58 id |
616-
| payload | <code>Buffer</code> | Event payload |
616+
| payloadSize | <code>number</code> | Event payload size in bytes |
617617
| publisher | <code>string</code> | The event publisher base58 id |
618618
| parent | <code>string</code> | The event parent base58 id |
619619
| isPublished | <code>boolean</code> | |
@@ -655,7 +655,7 @@ Human readable topic representation
655655
| name | <code>string</code> | The topic name |
656656
| author | <code>string</code> | The topic author base58 id |
657657
| parent | <code>string</code> | The topic parent base58 id |
658-
| # | <code>object.&lt;string, string&gt;</code> | The topic sub topics, were the keys are names and the values base58 representations of the topic |
658+
| # | <code>object.&lt;string, string&gt;</code> | The topic sub topics, where the keys are names and the values base58 representations of the topic |
659659
| metadata | <code>object</code> | Topic metadata object |
660660
| metadata.created | <code>string</code> | Date in ISO string format |
661661
| metadata.allowedPublishers | <code>Array.&lt;string&gt;</code> | Array of base58 peer ids allowed to publish |

‎src/dag/event-node.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const { linkUnmarshalling, linkMarshalling } = require('./utils')
2828
* @typedef {Object} ReadableEvent
2929
* @property {string} topicCID
3030
* @property {string} author - The event author base58 id
31-
* @property {Buffer} payload - Event payload
31+
* @property {number} payloadSize - Event payload size in bytes
3232
* @property {string} publisher - The event publisher base58 id
3333
* @property {string} parent - The event parent base58 id
3434
* @property {boolean} isPublished
@@ -160,7 +160,7 @@ class EventNode {
160160
return {
161161
topicCID: this.topicCID.toBaseEncodedString(),
162162
author: this.author.toB58String(),
163-
payload: this.payload,
163+
payloadSize: this.payload.length,
164164
publisher: this.publisher && this.publisher.toB58String(),
165165
parent: this.parent && this.parent.toBaseEncodedString(),
166166
isPublished: this.isPublished,

0 commit comments

Comments
 (0)
Please sign in to comment.