[@types/hapi-pino] Update hapi-pino to 6.4 (#42166)

This commit is contained in:
Matt Jeanes 2020-02-06 13:10:18 -05:00 committed by GitHub
parent 2eebcb4507
commit 7c723ba64a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -58,6 +58,7 @@ function example2() {
remove: true,
},
logRequestStart: true,
logRequestComplete: true,
prettyPrint: {
levelFirst: true,
colorize: true,
@ -82,3 +83,14 @@ function example3() {
redact: ['test.property'],
});
}
function example4() {
server.register({
plugin: HapiPino,
options: {
logRequestStart: (req: Request) => req.path !== '/ping',
logRequestComplete: (req: Request) => req.path !== '/ping',
getChildBindings: (req: Request) => ({}),
},
});
}

View File

@ -1,4 +1,4 @@
// Type definitions for hapi-pino 6.3
// Type definitions for hapi-pino 6.4
// Project: https://github.com/pinojs/hapi-pino#readme
// Definitions by: Rodrigo Saboya <https://github.com/saboya>
// Todd Bealmear <https://github.com/todd>
@ -30,7 +30,8 @@ declare namespace HapiPino {
interface Options {
logPayload?: boolean;
logRouteTags?: boolean;
logRequestStart?: boolean;
logRequestStart?: boolean | ((req: Request) => boolean);
logRequestComplete?: boolean | ((req: Request) => boolean);
stream?: NodeJS.WriteStream;
prettyPrint?: boolean | pino.PrettyOptions;
tags?: { [key in pino.Level]?: string };