Comparing version 8.5.1 to 8.6.0
@@ -15,9 +15,9 @@ // Project: https://github.com/pinojs/pino-http#readme | ||
declare function PinoHttp<IM = IncomingMessage, SR = ServerResponse, Opts = Options<IM, SR>>(opts?: Opts, stream?: pino.DestinationStream): HttpLogger<IM, SR, Opts>; | ||
declare function PinoHttp<IM = IncomingMessage, SR = ServerResponse, CustomLevels extends string = never>(opts?: Options<IM, SR>, stream?: pino.DestinationStream): HttpLogger<IM, SR, CustomLevels>; | ||
declare function PinoHttp<IM = IncomingMessage, SR = ServerResponse>(stream?: pino.DestinationStream): HttpLogger<IM, SR>; | ||
export interface HttpLogger<IM = IncomingMessage, SR = ServerResponse, Opts = Options<IM, SR>> { | ||
export interface HttpLogger<IM = IncomingMessage, SR = ServerResponse, CustomLevels extends string = never> { | ||
(req: IM, res: SR, next?: () => void): void; | ||
logger: pino.Logger<Opts>; | ||
logger: pino.Logger<CustomLevels>; | ||
} | ||
@@ -24,0 +24,0 @@ export type ReqId = number | string | object; |
@@ -211,3 +211,3 @@ | ||
// on the logger returned by pino-http | ||
pinoHttp({ | ||
pinoHttp<IncomingMessage, ServerResponse, 'bark'>({ | ||
customLevels: { | ||
@@ -214,0 +214,0 @@ bark: 25, |
@@ -262,2 +262,3 @@ 'use strict' | ||
function defaultSuccessfulRequestMessageProvider (req, res) { | ||
/* istanbul ignore next */ | ||
return res.writableEnded ? 'request completed' : 'request aborted' | ||
@@ -264,0 +265,0 @@ } |
{ | ||
"name": "pino-http", | ||
"version": "8.5.1", | ||
"version": "8.6.0", | ||
"description": "High-speed HTTP logger for Node.js", | ||
@@ -9,3 +9,3 @@ "main": "logger.js", | ||
"get-caller-file": "^2.0.5", | ||
"pino": "^8.0.0", | ||
"pino": "^8.17.0", | ||
"pino-std-serializers": "^6.0.0", | ||
@@ -12,0 +12,0 @@ "process-warning": "^2.0.0" |
@@ -477,3 +477,4 @@ 'use strict' | ||
test('log requests aborted during payload', function (t) { | ||
// TODO(mcollina): fix this test | ||
test('log requests aborted during payload', { skip: true }, function (t) { | ||
const dest = split(JSON.parse) | ||
@@ -480,0 +481,0 @@ const logger = pinoHttp(dest) |
Sorry, the diff of this file is not supported yet
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
78902
1847
Updatedpino@^8.17.0