From 0920649f230313cbf22574ea7bfc26537ca27556 Mon Sep 17 00:00:00 2001 From: Laurent Christophe Date: Tue, 15 Feb 2022 11:12:27 +0100 Subject: [PATCH] refactor: demote serialization failure from warning to debug Serialization failures happen when recorded values misbehave but it is not necessarily an unhappy path. There might good reasons why the recorded programs have values that cannot be serialized. Also, this message can be printed a lot so that alone would suffice for demotion. --- components/serialization/default/index.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/serialization/default/index.mjs b/components/serialization/default/index.mjs index 1dcacbe75..232907269 100644 --- a/components/serialization/default/index.mjs +++ b/components/serialization/default/index.mjs @@ -17,7 +17,7 @@ const noargs = []; export default (dependencies) => { const { util: { assert, hasOwnProperty, coalesce, incrementCounter, createCounter }, - log: { logWarning }, + log: { logDebug }, } = dependencies; const empty = symbolFor("APPMAP_EMPTY_MARKER"); const wellknown = new _Set( @@ -52,7 +52,7 @@ export default (dependencies) => { if (typeof name === "string") { return name; } - logWarning("failed to extract constructor name from %o", object); + logDebug("failed to extract constructor name from %o", object); return null; } object = getPrototypeOf(object); @@ -121,7 +121,7 @@ export default (dependencies) => { try { serial.print = value.toString(); } catch (error) { - logWarning("%o.toString() failure >> %O", value, error); + logDebug("%o.toString() failure >> %O", value, error); serial.print = apply(toString, value, noargs); } } else {