pino-pretty
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -162,4 +162,4 @@ 'use strict' | ||
if (log.type === 'Error') { | ||
const stack = log.stack ? log.stack : String(log.stack) | ||
if (log.type === 'Error' && log.stack) { | ||
const stack = log.stack | ||
line += IDENT + joinLinesWithIndentation(stack) + EOL | ||
@@ -166,0 +166,0 @@ |
{ | ||
"name": "pino-pretty", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Prettifier for Pino log lines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -189,6 +189,8 @@ 'use strict' | ||
t.test('handles errors with a null stack for Error object', (t) => { | ||
t.plan(1) | ||
t.plan(3) | ||
const pretty = prettyFactory() | ||
const expectedLines = [ | ||
' null' | ||
' type: "Error"', | ||
' stack: null', | ||
' some: "property"' | ||
] | ||
@@ -209,2 +211,3 @@ const log = pino({}, new Writable({ | ||
error.stack = null | ||
error.some = 'property' | ||
@@ -211,0 +214,0 @@ log.error(error) |
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
216300
928