Comparing version 1.3.7 to 1.3.8
@@ -268,3 +268,6 @@ /* | ||
if (!options.strict) { | ||
const o = merge({}, output, { | ||
const o = {}; | ||
if (meta instanceof Error && options.errorStack) | ||
o.stack = meta.stack; | ||
merge(o, output, { | ||
filter: (o, n) => | ||
@@ -275,3 +278,3 @@ !(fields.hasOwnProperty(n) || | ||
(typeof o[n] !== 'object' || isPlainObject(o[n])) | ||
}); | ||
}, {adjunct: true}); | ||
if (Object.keys(o).length) | ||
@@ -278,0 +281,0 @@ result += '\n' + stringify(o); |
@@ -269,5 +269,8 @@ /* | ||
if (typeof message === 'object') { | ||
if (message instanceof Error) | ||
meta.stack = message.stack; | ||
merge(meta, message, {adjunct: true, descriptor: true}); | ||
if (message instanceof Error) | ||
if (message instanceof Error) { | ||
Object.setPrototypeOf(meta, Object.getPrototypeOf(message)); | ||
} | ||
} else meta.message = util.format(message, ...args); | ||
@@ -274,0 +277,0 @@ if (this.defaultMeta) |
{ | ||
"name": "hixtory", | ||
"description": "Most flexible and fast logging library for NodeJS", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"author": "Panates Ltd.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
61650
1490