Comparing version 1.2.1 to 1.2.2
@@ -1,3 +0,1 @@ | ||
var _ = require('lodash'); | ||
exports.log = function(data, stream) { | ||
@@ -7,3 +5,3 @@ this.stream = this.stream || process.stdout; | ||
var logData = _.extend({}, this.defaultData, data); | ||
var logData = Object.assign({}, this.defaultData, data); | ||
@@ -27,3 +25,3 @@ if(this.timers){ | ||
timer.defaultData = this.defaultData; | ||
timer.timers = _.extend({}, this.timers) | ||
timer.timers = Object.assign({}, this.timers) | ||
timer.timers[label] = startTime; | ||
@@ -36,3 +34,3 @@ return timer; | ||
var namespaced = new logfmt() | ||
var namespace = _.extend({}, this.defaultData, object); | ||
var namespace = Object.assign({}, this.defaultData, object); | ||
namespaced.stream = this.stream; | ||
@@ -50,4 +48,4 @@ namespaced.defaultData = namespace | ||
var errorLogger = this.namespace({ | ||
error: true, | ||
id:id, | ||
error: true, | ||
id:id, | ||
now: (new Date()).toISOString() | ||
@@ -54,0 +52,0 @@ }) |
@@ -6,3 +6,2 @@ //constructor | ||
var _ = require('lodash'); | ||
var streaming = require('./lib/streaming'); | ||
@@ -17,4 +16,4 @@ var bodyParser = require('./lib/body_parser'); | ||
//Build up logfmt prototype | ||
_.extend(logfmt.prototype, logger); | ||
_.extend(logfmt.prototype, streaming); | ||
Object.assign(logfmt.prototype, logger); | ||
Object.assign(logfmt.prototype, streaming); | ||
@@ -44,2 +43,2 @@ logfmt.prototype.stringify = serializer.stringify; | ||
_.extend(logfmt, logfmt.prototype); | ||
Object.assign(logfmt, logfmt.prototype); |
{ | ||
"name": "logfmt", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "key=value logger and parser", | ||
@@ -14,4 +14,3 @@ "main": "logfmt.js", | ||
"split": "0.2.x", | ||
"through": "2.3.x", | ||
"lodash": "4.x" | ||
"through": "2.3.x" | ||
}, | ||
@@ -18,0 +17,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
2
65221
55
1503
- Removedlodash@4.x
- Removedlodash@4.17.21(transitive)