fix(js-client): Remove log truncation. (#403)

Remove log truncation.
Introducing additional log level
This commit is contained in:
Akim 2023-12-16 00:20:28 +07:00 committed by GitHub
parent d6008110cf
commit 9b629eef2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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),
);