Closed hdlinh1808 closed 4 weeks ago
I believe it's duplicated due to messageFormat: '{msg} {err}'
as any error also goes to the err
field of the logs entry.
Also, check out the proper usage of arguments here
@iamolegga I tried to remove it before, can solve the duplication, but my main purpose is making our log in just one line. If I remove it, my log still span 2 lines that make hard when searching:
something error
err: "{\"stack\":\"BadRequestException: user not exist! at UserService.getAndValidateUserByEmail (/app/dist/modules/user/services/user.service.js:99:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async UserService.removeUserByEmail (/app/dist/modules/user/services/user.service.js:119:22)\"}"
you need to get rid of pino-pretty
Question Hi team, I have config of logging in my project like this
But when I log like that in the filter:
My output error is duplicated:
How can I remove the second line? Thank you very much! Please mention other relevant information such as Node.js version and Operating System.