mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[@types/pino-http] Add missing getPath to autoLoggingOptions (#43948)
* Add missing getPath to autoLoggingOptions * Update pino-http-tests.ts * Update index.d.ts * Updates
This commit is contained in:
4
types/pino-http/index.d.ts
vendored
4
types/pino-http/index.d.ts
vendored
@@ -1,8 +1,9 @@
|
||||
// Type definitions for pino-http 4.4
|
||||
// Type definitions for pino-http 5.0
|
||||
// Project: https://github.com/pinojs/pino-http#readme
|
||||
// Definitions by: Christian Rackerseder <https://github.com/screendriver>
|
||||
// Jeremy Forsythe <https://github.com/jdforsythe>
|
||||
// Griffin Yourick <https://github.com/tough-griff>
|
||||
// Jorge Barnaby <https://github.com/yorch>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
@@ -38,6 +39,7 @@ declare namespace PinoHttp {
|
||||
|
||||
interface autoLoggingOptions {
|
||||
ignorePaths?: string[];
|
||||
getPath?: (req: IncomingMessage) => string | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ pinoHttp({ useLevel: 'error' });
|
||||
pinoHttp({ prettyPrint: true });
|
||||
pinoHttp({ autoLogging: false });
|
||||
pinoHttp({ autoLogging: { ignorePaths: ['/health'] } });
|
||||
pinoHttp({ autoLogging: { ignorePaths: ['/health'], getPath: (req) => req.url } });
|
||||
pinoHttp(new Writable());
|
||||
pinoHttp({
|
||||
customLogLevel(req, res) {
|
||||
|
||||
Reference in New Issue
Block a user