nibbioloN
Convex Community2y ago
2 replies
nibbiolo

Attaching metadata to console.log

hello, is there a way to include automatically in logs ( preferably via console.log() ) a specific "common" value that is used afteward to debug a "session"? FOr session here i mean a set of function which are needed to complete a bigger task. Example, I have a task that requires 15 mutations and 3 action calls. In datadog/axiom and i want to "isolate" all the functions related to that specific task. Ideally i want to add the ID of this task to all the related console.log wherever they are called (mutations or actions related to that task), but wondering if there is a way to do it which is not manual, something like in a wrapper/middleware, or a solution where i dont really need to pass manually this ID around to all console.log, or around function calling as parameter
Was this page helpful?