Comparing version 7.9.1 to 7.9.2
@@ -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 @@ ) |
{ | ||
"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() |
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
471671
11328
+ Addedthread-stream@0.15.2(transitive)
- Removedthread-stream@0.13.2(transitive)
Updatedthread-stream@^0.15.0