Skip to content

Commit

Permalink
Add console.trace()
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Oct 14, 2023
1 parent 612a208 commit cc6a443
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-mails-hang.md
@@ -0,0 +1,5 @@
---
'nxjs-runtime': patch
---

Add `console.trace()`
6 changes: 6 additions & 0 deletions packages/runtime/src/console.ts
Expand Up @@ -86,4 +86,10 @@ export const console = {
debug(...input: unknown[]) {
console.log(...input);
},

trace(...input: unknown[]) {
const f = format(...input);
const s = new Error().stack!.split('\n').slice(1).join('\n');
Switch.print(`Trace${f ? `: ${f}` : ''}\n${s}`);
},
};

0 comments on commit cc6a443

Please sign in to comment.