mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[@types/hapi-pino] Update hapi-pino to 6.4 (#42166)
This commit is contained in:
parent
2eebcb4507
commit
7c723ba64a
@ -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) => ({}),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
5
types/hapi-pino/index.d.ts
vendored
5
types/hapi-pino/index.d.ts
vendored
@ -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 };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user