Reputation: 283083
I've figured out how to pretty-print the logs in fastify
:
const server = fastify({
logger: {
prettyPrint: __DEV__ && {
translateTime: 'h:MM:ss TT',
colorize: true,
ignore: 'pid,hostname'
},
},
})
But the time is in UTC. How can I get it in my local time or specify a timezone?
Upvotes: 0
Views: 2294
Reputation: 12900
Using pino-pretty@4
you need to set:
translateTime: 'SYS:h:MM:ss TT Z o',
All the cli args can be set with the option json
Upvotes: 1