Closed thebrownfox closed 2 years ago
This is not an error but a warning. Follow the instructions at https://github.com/pinojs/pino-pretty to remove it.
Once you figure it out, would you like to send us a PR to update our docs?
This is not an error but a warning. Follow the instructions at https://github.com/pinojs/pino-pretty to remove it.
Well, actually localhost crashed. 😅
TypeError: Cannot set properties of undefined (setting 'asMetaWrapper')
at getPrettyStream (node_modules/pino/lib/tools.js:221:33)
at normalizeArgs (node_modules/pino/lib/tools.js:433:16)
at pino (node_modules/pino/pino.js:83:28)
at Object.register (node_modules/hapi-pino/index.js:55:14)
at internals.Server.register (node_modules/@hapi/hapi/lib/server.js:495:35)
at start (index.js:121:15)
[nodemon] app crashed - waiting for file changes before starting...
Once you figure it out, would you like to send us a PR to update our docs?
Sure, I just changed prettyPrint option to false. However, I'd like to have the pretty print available. How can I use/configure pino transport/stream globally?
This seems to work (taken from PR). Needs latest pino-pretty
. This issue can be closed after the package is updated upstream and docs changed to reflect this usage.
await server.register({
plugin: HapiPino,
options: {
// Redact Authorization headers, see https://getpino.io/#/docs/redaction
redact: ["req.headers.authorization"],
transport: {
target: "pino-pretty",
options: {
colorize: true,
minimumLevel: "info",
levelFirst: true,
messageFormat: true,
timestampKey: "time",
translateTime: true,
singleLine: false,
mkdir: true,
append: true,
},
},
},
});
Would you like to send a Pull Request to address this issue?
Project throws an error after update to 9.0.0.