captains-log
Advanced tools
Comparing version 1.0.3 to 2.0.0
@@ -7,5 +7,6 @@ /** | ||
var _ = require('@sailshq/lodash'); | ||
var semver = require('semver'); | ||
var IS_NODE_8_OR_NEWER = semver.satisfies(semver.clean(process.version), '8'); | ||
/** | ||
@@ -62,4 +63,7 @@ * Build a log function which combines arguments into a string, | ||
// > as explained in: https://github.com/balderdashy/captains-log/issues/17 | ||
if (_.isError(arg) && arg.stack && !arg.inspect && !options._dontAccessErrorStacks) { | ||
pieces.push(arg.stack); | ||
if (!options._dontAccessErrorStacks && _.isError(arg) && !arg.inspect) { | ||
// In Node 8, the behavior of util.inspect-ing Errors changed to include | ||
// their stack traces, plus additional information. So if supported, | ||
// we take advange of that. | ||
pieces.push(IS_NODE_8_OR_NEWER ? util.inspect(arg) : arg.stack); | ||
} | ||
@@ -66,0 +70,0 @@ // Non-strings |
{ | ||
"name": "captains-log", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "Lightweight logger with a simple pass-through configuration for use with fancier logging libraries", | ||
@@ -28,3 +28,4 @@ "main": "index.js", | ||
"@sailshq/lodash": "^3.10.2", | ||
"rc": "1.0.1" | ||
"rc": "1.0.1", | ||
"semver": "5.4.1" | ||
}, | ||
@@ -31,0 +32,0 @@ "devDependencies": { |
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
55348
1182
4
+ Addedsemver@5.4.1
+ Addedsemver@5.4.1(transitive)