Open hao5743 opened 4 years ago
In some cases, if log had one key 'req.id', For example: {req: {id: '123'}, 'req.id':'me', context: 'hello'} this would return 'me'
I'm not seeing this issue:
❯ echo '{"req":{"id":3}}' | npx pino-pretty
npx: installed 35 in 1.707s
req: {
"id": 3
}
❯ echo '{"req":{"id":3}, "req.id":"foo"}' | npx pino-pretty
npx: installed 35 in 1.689s
req: {
"id": 3
}
req.id: "foo"
For log example: {req: {id: '123'}, context: 'hello'} If prettifyMessage set to {req.id}, shoud get the value '123'