简体   繁体   English

PinoWarning:prettyPrint 已弃用,请查看 https://github.com/pinojs/pino-pretty 寻找替代方案

[英]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.

相关问题 无法确定“pino-pretty”的传输目标 - unable to determine transport target for "pino-pretty" 一起使用 express-pino-logger 和 pino-pretty - Using express-pino-logger and pino-pretty together 缺少 `pino-pretty` 模块:`pino-pretty` 必须单独安装 - Missing `pino-pretty` module: `pino-pretty` must be installed separately pino-pretty,如何将文件名添加到日志行 - pino-pretty, how to add file name to log line 如何处理“已弃用,请使用https://github.com/pillarjs/path-to-regexp”消息 - how to deal with “DEPRECATED use https://github.com/pillarjs/path-to-regexp” message 如何从github.com以及NodeJs(https)下载文件 - How download file from github.com whith NodeJs (https) 如何修复“npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142”错误Windows 10? - How to fix "npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142" error in Windows 10? 在异步队列内的函数内进行异步Twitter调用-https://github.com/DeviaVir/zenbot - Async twitter call inside a function that is inside a async queue - https://github.com/DeviaVir/zenbot 无法在meanstack MEANIO上运行localhost:3000,https://github.com/linnovate/mean - cannot run localhost:3000 on meanstack MEANIO, https://github.com/linnovate/mean 是否可以使用node-smpp(https://github.com/farhadi/node-smpp)发送批量短信? - Is it possible to send bulk sms with node-smpp (https://github.com/farhadi/node-smpp)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM