[英]PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives
I suddenly started getting following error in my nodejs project我的 nodejs 项目突然开始出现以下错误
[PINODEP008] PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.
What to do?该怎么办? App is crashing应用程序崩溃
(Use `node --trace-warnings ...` to show where the warning was created)
[nodemon] app crashed - waiting for file changes before starting...
If you are looking for the solution of [PINODEP008] PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives, then, I solved the same in my application, as below:如果你正在寻找 [PINODEP008] PinoWarning: prettyPrint is deprecated 的解决方案,请查看https://github.com/pinojs/pino-pretty的替代方案,然后,我在我的应用程序中解决了同样的问题,如下所示:
Instead of代替
pinoHttp: {
prettyPrint: {
ignore:'req.headers,res',
}
}
Updated this:更新了这个:
pinoHttp: {
transport: {
target: 'pino-pretty',
options: {
ignore:'req.headers,res',
}
}
}
Reference: https://github.com/Zialus/TW-Minesweeper-Server/commit/f67ae7e33434fd36d14760f1c5572cefd52bae92参考: https://github.com/Zialus/TW-Minesweeper-Server/commit/f67ae7e33434fd36d14760f1c5572cefd52bae92
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.