Socket
Socket
Sign inDemoInstall

pino

Package Overview
Dependencies
Maintainers
4
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino - npm Package Compare versions

Comparing version 7.9.1 to 7.9.2

7

lib/proto.js

@@ -120,8 +120,3 @@ 'use strict'

formatters.level,
formatters.bindings
? (bindings) => ({
...formatters.bindings(JSON.parse('{' + this[chindingsSym].substr(1) + '}')),
...bindings
})
: resetChildingsFormatter,
resetChildingsFormatter,
formatters.log

@@ -128,0 +123,0 @@ )

6

package.json
{
"name": "pino",
"version": "7.9.1",
"version": "7.9.2",
"description": "super fast, all natural json logger",

@@ -88,3 +88,3 @@ "main": "pino.js",

"loglevel": "^1.6.7",
"pino-pretty": "^v7.5.3",
"pino-pretty": "^v7.5.4",
"pre-commit": "^1.2.2",

@@ -115,3 +115,3 @@ "proxyquire": "^2.1.3",

"sonic-boom": "^2.2.1",
"thread-stream": "^0.13.0"
"thread-stream": "^0.15.0"
},

@@ -118,0 +118,0 @@ "tsd": {

@@ -204,75 +204,2 @@ 'use strict'

test('Parent bindings in child logger', async ({ match }) => {
const stream = sink()
const logger = pino({
formatters: {
bindings (bindings) {
return {
...bindings,
process: {
pid: bindings.pid
},
from: 'parent'
}
}
}
}, stream)
const child = logger.child({
foo: 'bar'
})
const childOut = once(stream, 'data')
child.info('hello world')
match(await childOut, {
process: {
pid: process.pid
},
from: 'parent',
foo: 'bar'
})
})
test('Parent bindings in child logger with it\'s own bindings', async ({ match }) => {
const stream = sink()
const logger = pino({
formatters: {
bindings (bindings) {
return {
process: {
pid: bindings.pid
},
from: 'parent'
}
}
}
}, stream)
const childWithBindings = logger.child({
foo: 'bar'
}, {
formatters: {
bindings (bindings) {
return {
...bindings,
from: 'child'
}
}
}
})
const childWithBindingsOut = once(stream, 'data')
childWithBindings.info('hello world')
match(await childWithBindingsOut, {
process: {
pid: process.pid
},
foo: 'bar',
from: 'child'
})
})
test('Formatters without bindings in child logger', async ({ match }) => {

@@ -279,0 +206,0 @@ const stream = sink()

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