Comparing version 4.10.0 to 4.10.1
{ | ||
"name": "pino", | ||
"version": "4.10.0", | ||
"version": "4.10.1", | ||
"description": "super fast, all natural json logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -276,9 +276,9 @@ 'use strict' | ||
if (iopts.extreme && iopts.prettyPrint) throw Error('cannot enable pretty print in extreme mode') | ||
if (stream && iopts.prettyPrint) throw Error('cannot enable pretty print when stream specified') | ||
istream = istream || process.stdout | ||
var isStdout = istream === process.stdout | ||
if (!isStdout && iopts.prettyPrint) throw Error('cannot enable pretty print when stream is not process.stdout') | ||
if (iopts.prettyPrint) { | ||
var prettyOpts = Object.assign({ messageKey: iopts.messageKey }, iopts.prettyPrint) | ||
var pstream = pretty(prettyOpts) | ||
var origStream = istream | ||
pump(pstream, origStream, function (err) { | ||
pump(pstream, process.stdout, function (err) { | ||
if (err) instance.emit('error', err) | ||
@@ -285,0 +285,0 @@ }) |
@@ -268,1 +268,6 @@ 'use strict' | ||
}) | ||
test('does not throw error when enabled with stream specified', function (t) { | ||
pino({prettyPrint: true}, process.stdout) | ||
t.end() | ||
}) |
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
171283
4098