New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hapi-pino

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-pino - npm Package Compare versions

Comparing version 8.2.0 to 8.3.0

1

index.js

@@ -163,2 +163,3 @@ 'use strict'

payload: options.logPayload ? request.payload : undefined,
queryParams: options.logQueryParams ? request.query : undefined,
tags: options.logRouteTags ? request.route.settings.tags : undefined,

@@ -165,0 +166,0 @@ // note: pino doesnt support unsetting a key, so this next line

2

package.json
{
"name": "hapi-pino",
"version": "8.2.0",
"version": "8.3.0",
"description": "Hapi plugin for the Pino logger ",

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

@@ -96,3 +96,8 @@ # hapi-pino  [![Build Status](https://travis-ci.org/pinojs/hapi-pino.svg)](https://travis-ci.org/pinojs/hapi-pino) [![Coverage Status](https://coveralls.io/repos/github/pinojs/hapi-pino/badge.svg?branch=master)](https://coveralls.io/github/pinojs/hapi-pino?branch=master)

### `options.logQueryParams: boolean`
**Default**: `false`
When enabled, add the request query as `queryParams` to the `response` event log.
### `options.logRouteTags: boolean`

@@ -99,0 +104,0 @@

@@ -2067,1 +2067,32 @@ 'use strict'

})
experiment('logging with request queryParams', () => {
test('with pre-defined req serializer', async () => {
const server = getServer()
let resolver
const done = new Promise((resolve, reject) => {
resolver = resolve
})
const stream = sink(data => {
expect(data.queryParams).to.equal({ foo: '42', bar: '43' })
resolver()
})
const logger = require('pino')(stream)
const plugin = {
plugin: Pino,
options: {
instance: logger,
logQueryParams: true
}
}
await server.register(plugin)
await server.inject({
method: 'POST',
url: '/?foo=42&bar=43'
})
await done
})
})
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