@elastic.io/bunyan-logger
Advanced tools
Comparing version 0.0.2 to 0.0.3-dev-y.0
@@ -12,6 +12,18 @@ 'use strict'; | ||
function errSerializerWithErrors(err) { | ||
const output = bunyan.stdSerializers.err(err); | ||
if (err.errors) { | ||
// Mongoose collects all validation errors here so it useful to pass them | ||
output.errors = err.errors; | ||
} | ||
return output; | ||
} | ||
const serializers = Object.create(bunyan.stdSerializers); | ||
serializers.err = errSerializerWithErrors; | ||
const log = bunyan.createLogger({ | ||
name: appName, | ||
level: level, | ||
serializers: bunyan.stdSerializers | ||
serializers | ||
}); | ||
@@ -18,0 +30,0 @@ |
{ | ||
"name": "@elastic.io/bunyan-logger", | ||
"version": "0.0.2", | ||
"version": "0.0.3-dev-y.0", | ||
"description": "Logger for elastic.io platform based on Bunyan", | ||
@@ -5,0 +5,0 @@ "main": "lib/logger.js", |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16526
31
0