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

em-logr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

em-logr - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

.eslintrc.yml

32

logr.js

@@ -5,4 +5,17 @@ 'use strict';

const bunyan = require('bunyan');
bunyan.prototype.child = function (options, simple) {
var name;
if (options && options.name) {
name = options.name;delete options.name;
}
return bunyan.createLogger({
const child = new (this.constructor)(this, options || {}, simple);
if (name) child.fields.name = name;
return child;
};
const logr = bunyan.createLogger({
name: 'BUNY',

@@ -15,7 +28,20 @@ level,

src: ( ['debug','trace'].indexOf(level) !== -1 ),
})
});
return Object.defineProperty(logr, 'name', {
get( ){ return this.fields.name; },
set(_){ return this.fields.name = _; }
});
}
function getPino(level) {
return require('pino')({name: 'PINO', level});
const pino = require('pino')({name: 'PINO', level});
pino.fields = {pino};
Object.defineProperty(pino.fields, 'name', {
get( ){ return this.pino.name; },
set(_){ return this.pino.name = _; }
});
return pino;
}

@@ -22,0 +48,0 @@

2

package.json
{
"name": "em-logr",
"version": "1.1.1",
"version": "1.1.2",
"description": "Bunyan/Pino Logger instance ready to use",

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

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