Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
refactor: demote serialization failure from warning to debug
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lachrist committed Feb 15, 2022
1 parent d74baff commit 0920649
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/serialization/default/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0920649

Please sign in to comment.