hmpo-logger
Advanced tools
Comparing version 0.0.6 to 1.0.0
@@ -5,2 +5,3 @@ var winston = require('winston'), | ||
moduleName = require('./module-name'), | ||
logstash = require('./logstash'), | ||
onFinished = require('on-finished'), | ||
@@ -33,3 +34,3 @@ onHeaders = require('on-headers'); | ||
sessionID: 'sessionID', | ||
verb: 'method', | ||
method: 'method', | ||
request: 'request' | ||
@@ -134,4 +135,5 @@ }, | ||
filename: this._options.app, | ||
json: this._options.appJSON, | ||
logstash: this._options.appJSON, | ||
json: false, | ||
logstash: false, | ||
formatter: this._options.appJSON ? logstash : undefined, | ||
level: this._options.appLevel | ||
@@ -149,4 +151,5 @@ }) | ||
filename: this._options.error, | ||
json: this._options.errorJSON, | ||
logstash: this._options.errorJSON, | ||
json: false, | ||
logstash: false, | ||
formatter: this._options.appJSON ? logstash : undefined, | ||
level: this._options.errorLevel | ||
@@ -153,0 +156,0 @@ }) |
{ | ||
"name": "hmpo-logger", | ||
"version": "0.0.6", | ||
"version": "1.0.0", | ||
"description": "Consistent logging for hmpo apps", | ||
@@ -27,2 +27,3 @@ "main": "index.js", | ||
"on-headers": "^1.0.1", | ||
"sort-object-keys": "^1.1.2", | ||
"underscore": "^1.8.3", | ||
@@ -29,0 +30,0 @@ "winston": "^2.2.0" |
@@ -80,3 +80,3 @@ # hmpo-logger | ||
sessionID: 'sessionID', | ||
verb: 'method', | ||
method: 'method', | ||
request: 'request' | ||
@@ -83,0 +83,0 @@ }, |
@@ -249,5 +249,5 @@ | ||
sessionID: 'abc123', | ||
method: 'GET', | ||
request: '/abc/123', | ||
responseTime: 5000, | ||
verb: 'GET' | ||
responseTime: 5000 | ||
})); | ||
@@ -254,0 +254,0 @@ }); |
@@ -93,2 +93,15 @@ | ||
it('should use non-logstash logging if JSON is false', function () { | ||
manager.config({ | ||
appJSON: false, | ||
errorJSON: false | ||
}); | ||
var t = winston.loggers.options.transports; | ||
t.length.should.equal(3); | ||
expect(t[1].formatter).to.be.undefined; | ||
expect(t[2].formatter).to.be.undefined; | ||
}); | ||
it('should disable transports that are specified as falsey', function () { | ||
@@ -111,3 +124,3 @@ manager.config({ | ||
extra: 'extravalue', | ||
verb: false | ||
method: false | ||
} | ||
@@ -114,0 +127,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
56625
21
1339
0
5
+ Addedsort-object-keys@^1.1.2
+ Addedsort-object-keys@1.1.3(transitive)