Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pino-http

Package Overview
Dependencies
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-http - npm Package Compare versions

Comparing version 10.0.0 to 10.1.0

2

logger.js

@@ -122,3 +122,3 @@ 'use strict'

}),
errorMessage(req, res, error)
errorMessage(req, res, error, responseTime)
)

@@ -125,0 +125,0 @@

{
"name": "pino-http",
"version": "10.0.0",
"version": "10.1.0",
"description": "High-speed HTTP logger for Node.js",

@@ -5,0 +5,0 @@ "main": "logger.js",

@@ -950,2 +950,22 @@ 'use strict'

test('pass responseTime argument to the custom errorMessage callback', function (t) {
const dest = split(JSON.parse)
const customErrorMessage = 'Response time is:'
const logger = pinoHttp({
customErrorMessage: function (req, res, err, responseTime) {
return `${customErrorMessage} ${responseTime} ${req.method}`
}
}, dest)
setup(t, logger, function (err, server) {
t.error(err)
doGet(server, ERROR_URL)
})
dest.on('data', function (line) {
t.match(line.msg, /Response time is: \d+ GET/)
t.end()
})
})
test('uses the custom successObject callback if passed in as an option', function (t) {

@@ -952,0 +972,0 @@ const dest = split(JSON.parse)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc