File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ const { pinoHttp: pinoHttpCjsNamed } = require('.');
11
11
const logger = pino ( ) ;
12
12
13
13
expectType < HttpLogger > ( pinoHttp ( { logger } ) ) ;
14
+ expectType < HttpLogger > ( pinoHttp ( {
15
+ customSuccessMessage ( req , res , responseTime ) {
16
+ return `${ responseTime } `
17
+ }
18
+ } ) ) ;
14
19
expectType < HttpLogger > ( pinoHttpNamed ( ) ) ;
15
20
expectType < HttpLogger > ( pinoHttpStar . default ( ) ) ;
16
21
expectType < HttpLogger > ( pinoHttpStar . pinoHttp ( ) ) ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export interface Options extends pino.LoggerOptions {
30
30
autoLogging ?: boolean | AutoLoggingOptions | undefined ;
31
31
customLogLevel ?: ( ( req : IncomingMessage , res : ServerResponse , error ?: Error ) => pino . LevelWithSilent ) | undefined ;
32
32
customReceivedMessage ?: ( ( req : IncomingMessage , res : ServerResponse ) => string ) | undefined ;
33
- customSuccessMessage ?: ( ( req : IncomingMessage , res : ServerResponse ) => string ) | undefined ;
33
+ customSuccessMessage ?: ( ( req : IncomingMessage , res : ServerResponse , responseTime : number ) => string ) | undefined ;
34
34
customErrorMessage ?: ( ( req : IncomingMessage , res : ServerResponse , error : Error ) => string ) | undefined ;
35
35
customReceivedObject ?: ( ( req : IncomingMessage , res : ServerResponse , val ?: any ) => any ) | undefined ;
36
36
customSuccessObject ?: ( ( req : IncomingMessage , res : ServerResponse , val : any ) => any ) | undefined ;
You can’t perform that action at this time.
0 commit comments