We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad0a45e commit f3a0269Copy full SHA for f3a0269
packages/core/src/logger.ts
@@ -77,12 +77,20 @@ class ElizaLogger {
77
const c = this.#getColor(foregroundColor, backgroundColor);
78
// turns objects into printable strings
79
strings = strings.map((item) => {
80
- if (typeof item === "object") item = JSON.stringify(item);
+ if (typeof item === "object") {
81
+ // Handle BigInt serialization
82
+ return JSON.stringify(item, (key, value) =>
83
+ typeof value === 'bigint'
84
+ ? value.toString()
85
+ : value
86
+ );
87
+ }
88
return item;
89
});
90
console.log(c, strings.join(""), this.#getColorReset());
91
if (this.closeByNewLine) console.log("");
92
}
93
+
94
log(...strings) {
95
const fg = "white";
96
const bg = "";
0 commit comments