filter-log
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -40,2 +40,7 @@ var _ = require('underscore') | ||
} | ||
if(data instanceof Error) { | ||
data = { | ||
error: data | ||
} | ||
} | ||
if(typeof data == 'object') { | ||
@@ -42,0 +47,0 @@ stream.write(_.extend({}, data, {level: filterLog.levels[key]})) |
{ | ||
"name": "filter-log", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "flexible, minimalistic logging", | ||
@@ -5,0 +5,0 @@ "main": "filter-log.js", |
@@ -61,3 +61,14 @@ var filog = require('../filter-log') | ||
it("test error object", function() { | ||
filog.clearProcessors() | ||
var out = objStream() | ||
filog.defineProcessor('string-out', null, out) | ||
let msg = 'This is a test' | ||
let e = new Error(msg) | ||
debugger | ||
log1.info(e) | ||
assert(out.data[0].error.toString().indexOf('Error: This is a test') == 0) | ||
}) | ||
}) |
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
34325
419