You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use pino caller to see where errors happens easily.
/*Set LOG_LEVEL to one of (debug, error, fatal, info, silent, trace, warn)*/importpinofrom"pino";importpinoCallerfrom"pino-caller";varlog=pino({level: process.env.LOG_LEVEL?.toLowerCase()??'info',transport: {target: "pino-pretty",options: {messageFormat: '{msg}',ignore: 'pid,hostname,filename',}},});varlog=pinoCaller(log)exportdefaultlog;
The current output is:
bun run src/index.ts[14:31:23.288] ERROR <module code (/Volumes/Internal/pino/src/other.ts:3:4)>: other.ts[14:31:23.297] ERROR <module code (/Volumes/Internal/pino/src/index.ts:3:4)>: index.ts
How can I configure it to be like:
[14:31:23.288] ERROR at /Volumes/Internal/pino/src/other.ts:3:4: other.ts[14:31:23.297] ERROR at /Volumes/Internal/pino/src/index.ts:3:4: index.ts
Another issue related to pino: it doesn't print the rest parameters I provide like console.log
eg. logger.debug('hello', 'world') - only hello printed.
The text was updated successfully, but these errors were encountered:
I use pino caller to see where errors happens easily.
The current output is:
How can I configure it to be like:
Another issue related to pino: it doesn't print the rest parameters I provide like
console.log
eg.
logger.debug('hello', 'world')
- onlyhello
printed.The text was updated successfully, but these errors were encountered: