recommended logger for convex functions?
hi team, i've been using tslog as my logger for my front end stuff. apparently when i try to import it to my convex functions, im getting weird stuff, sth like some byte arrays?
i think i can go with console.log, just wondering if there's some known limitation with my current approach. thanks!
1 Reply
Those look like ansi escape codes https://en.wikipedia.org/wiki/ANSI_escape_code?wprov=sfti1 which are used to change colors when printing to a terminal. Convex's logging doesn't parse the codes so they get printed out like this.
I'm not familiar with tslog but according to its docs you could try
new Logger({ type: "json" });
ANSI escape code
ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals and terminal emulators. Certain sequences of bytes, most starting with an ASCII escape character and a bracket character, are embedded into text. The terminal interprets these sequences as command...