Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hmpo-logger

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hmpo-logger - npm Package Compare versions

Comparing version 0.0.6 to 1.0.0

lib/logstash.js

13

lib/manager.js

@@ -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 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc