Comparing version 1.0.5 to 1.0.6
@@ -58,3 +58,10 @@ "use strict"; | ||
_.each(getKeys(obj), function (key) { | ||
var keys = getKeys(obj); | ||
if (_.isError(obj)) { | ||
r.push('ERROR'); | ||
r.push(toString(obj.message)); | ||
keys = _.difference(keys, ['stack', 'message']); | ||
} | ||
_.each(keys, function (key) { | ||
var val = obj[key]; | ||
@@ -61,0 +68,0 @@ if (_.isNull(val) || _.isUndefined(val)) { |
@@ -5,3 +5,3 @@ MIT License | ||
``` | ||
Copyright (C) 2015, 2016 SSi Micro, Ltd. and other contributors. | ||
Copyright (C) 2015, 2016, 2017 SSi Micro, Ltd. and other contributors. | ||
@@ -8,0 +8,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
{ | ||
"name": "logformat", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "stringify objects into searchable strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,4 +38,6 @@ "use strict"; | ||
it('should return a string when given an Error object', function () { | ||
expect(logformat(new Error('Test'))).to.be('message=Test'); | ||
expect(logformat({ err: new Error('Test') })).to.be('err.message=Test'); | ||
var err = new Error('Test'); | ||
err.name = 'logformat.test.err'; | ||
expect(logformat(err)).to.be('ERROR Test name=logformat.test.err'); | ||
expect(logformat({ err: err })).to.be('err.name=logformat.test.err err.message=Test'); | ||
}); | ||
@@ -42,0 +44,0 @@ it('should return a string of key=value pairs for objects', function () { |
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
11190
162