From 9b629eef2e188331cfb338efe775f20dac9bc2fb Mon Sep 17 00:00:00 2001 From: Akim <59872966+akim-bow@users.noreply.github.com> Date: Sat, 16 Dec 2023 00:20:28 +0700 Subject: [PATCH] fix(js-client): Remove log truncation. (#403) Remove log truncation. Introducing additional log level --- packages/core/js-client/src/jsPeer/FluencePeer.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/core/js-client/src/jsPeer/FluencePeer.ts b/packages/core/js-client/src/jsPeer/FluencePeer.ts index 7cd76f94..5f2e736c 100644 --- a/packages/core/js-client/src/jsPeer/FluencePeer.ts +++ b/packages/core/js-client/src/jsPeer/FluencePeer.ts @@ -69,6 +69,7 @@ import { getErrorMessage, isString, jsonify } from "../util/utils.js"; import { ExpirationError, InterpreterError, SendError } from "./errors.js"; const log_particle = logger("particle"); +const log_particle_data = logger("particle:data"); const log_peer = logger("peer"); export type PeerConfig = { @@ -485,10 +486,10 @@ export abstract class FluencePeer { item.particle.id, ); - log_particle.trace( + log_particle_data.trace( "id %s. prevData: %s", item.particle.id, - this.decodeAvmData(prevData).slice(0, 50), + this.decodeAvmData(prevData), ); const args = serializeAvmArgs( @@ -563,7 +564,7 @@ export abstract class FluencePeer { item.result.errorMessage, ); - log_particle.trace( + log_particle_data.trace( "id %s. avm data: %s", item.particle.id, this.decodeAvmData(item.result.data), @@ -579,9 +580,14 @@ export abstract class FluencePeer { } log_particle.trace( - "id %s. interpreter result: retCode: %d, avm data: %s", + "id %s. interpreter result: retCode: %d", item.particle.id, item.result.retCode, + ); + + log_particle_data.trace( + "id %s. avm data: %s", + item.particle.id, this.decodeAvmData(item.result.data), );