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.2 to 0.0.3

24

lib/manager.js

@@ -37,2 +37,3 @@ var winston = require('winston'),

clientip: 'clientip',
uniqueID: 'x-uniq-id',
remoteAddress: 'connection.remoteAddress',

@@ -85,4 +86,25 @@ hostname: 'hostname',

_.extend(this._options, options);
if (options) {
this._options = _.extend(
{},
Manager.defaultOptions,
options);
this._options.meta = _.pick(
_.extend(
{},
Manager.defaultOptions.meta,
options.meta
),
_.isString);
this._options.requestMeta = _.pick(
_.extend(
{},
Manager.defaultOptions.requestMeta,
options.requestMeta
),
_.isString);
}
winston.addColors(Manager.levelColors);

@@ -89,0 +111,0 @@

2

package.json
{
"name": "hmpo-logger",
"version": "0.0.2",
"version": "0.0.3",
"description": "Consistent logging for hmpo apps",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -73,2 +73,3 @@ # hmpo-logger

clientip: 'clientip',
uniqueID: 'x-uniq-id',
remoteAddress: 'connection.remoteAddress',

@@ -75,0 +76,0 @@ hostname: 'hostname',

@@ -85,2 +85,19 @@

it('should augment instead of overwriting configured meta data', function () {
manager.config({
meta: {
host: undefined,
request: null,
extra: 'extravalue',
verb: false
}
});
manager._options.meta.should.deep.equal({
pm: 'env[pm_id]',
sessionID: 'sessionID',
extra: 'extravalue'
});
});
});

@@ -87,0 +104,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