Comparing version 8.3.0 to 8.3.1
@@ -31,3 +31,3 @@ // Project: https://github.com/pinojs/pino-http#readme | ||
autoLogging?: boolean | AutoLoggingOptions | undefined; | ||
customLogLevel?: ((req: IncomingMessage, res: ServerResponse, error: Error) => pino.LevelWithSilent) | undefined; | ||
customLogLevel?: ((req: IncomingMessage, res: ServerResponse, error?: Error) => pino.LevelWithSilent) | undefined; | ||
customReceivedMessage?: ((req: IncomingMessage, res: ServerResponse) => string) | undefined; | ||
@@ -34,0 +34,0 @@ customSuccessMessage?: ((req: IncomingMessage, res: ServerResponse) => string) | undefined; |
@@ -31,3 +31,3 @@ | ||
pinoHttp({ customAttributeKeys: { req: 'req', res: 'res', err: 'err', responseTime: 'responseTime' } }); | ||
pinoHttp({ customLogLevel: (req: IncomingMessage, res: ServerResponse, error: Error) => 'info' }); | ||
pinoHttp({ customLogLevel: (req: IncomingMessage, res: ServerResponse, error: Error | undefined) => error ? 'error' : 'info' }); | ||
pinoHttp({ customProps: (req: IncomingMessage, res: ServerResponse) => ({ key1: 'value1', 'x-key-2': 'value2' }) }); | ||
@@ -109,3 +109,3 @@ pinoHttp({ wrapSerializers: false }); | ||
autoLogging: canBeUndefined(autoLoggingOptions), | ||
customLogLevel: canBeUndefined((req: IncomingMessage, res: ServerResponse, error: Error) => rtnLevel()), | ||
customLogLevel: canBeUndefined((req: IncomingMessage, res: ServerResponse, _error: Error | undefined) => rtnLevel()), | ||
customReceivedMessage: canBeUndefined((req, res) => { | ||
@@ -112,0 +112,0 @@ res.setHeader('x-custom-header-123', 'custom-header-value'); |
{ | ||
"name": "pino-http", | ||
"version": "8.3.0", | ||
"version": "8.3.1", | ||
"description": "High-speed HTTP logger for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "logger.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75203