pino icon indicating copy to clipboard operation
pino copied to clipboard

[Question] How to get a trace log similar to console.log?

Open xcruzix opened this issue 3 years ago • 1 comments

Hi,

is there a way to get a trace log similar to console.log? The trace function in pino seems to just log with a different level but the output is the same like the other levels.

e.g. console.trace: api_1 | Trace: Console.trace api_1 | at Object.<anonymous> (/home/node/app/app.js:114:9) api_1 | at Module._compile (internal/modules/cjs/loader.js:1085:14) api_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) api_1 | at Module.load (internal/modules/cjs/loader.js:950:32) api_1 | at Function.Module._load (internal/modules/cjs/loader.js:790:14) api_1 | at Module.require (internal/modules/cjs/loader.js:974:19) api_1 | at require (internal/modules/cjs/helpers.js:92:18) api_1 | at Object.<anonymous> (/home/node/app/bin/index.js:12:13) api_1 | at Module._compile (internal/modules/cjs/loader.js:1085:14) api_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) api_1 | at Module.load (internal/modules/cjs/loader.js:950:32) api_1 | at Function.Module._load (internal/modules/cjs/loader.js:790:14) api_1 | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) api_1 | at internal/main/run_main_module.js:17:47

pino.trace: {"level":10,"time":1625559615385,"pid":33,"hostname":"05b813bbbecf","module":"APP","msg":"pino.trace"}

xcruzix avatar Jul 06 '21 08:07 xcruzix

You should create an error and log it

mcollina avatar Jul 06 '21 11:07 mcollina

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Feb 18 '23 00:02 github-actions[bot]