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

ba-js-logger

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ba-js-logger - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

13

lib/logger.js

@@ -9,2 +9,7 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

_createClass(Logger, null, [{
key: 'LEVEL',
value: function LEVEL(level) {
return ['d', 'i', 'w', 'e', 'f'].indexOf(level);
}
}, {
key: 'LEVEL_DEBUG',

@@ -36,3 +41,3 @@ get: function get() {

function Logger(url, context) {
function Logger(url, context, level) {
_classCallCheck(this, Logger);

@@ -42,2 +47,3 @@

this.context = context;
this.level = Logger.LEVEL(level || Logger.LEVEL_INFO);
}

@@ -65,3 +71,6 @@

value: function send(message, level, logger) {
return this.postRequest(message, level, logger);
if (Logger.LEVEL(level) >= this.level) {
return this.postRequest(message, level, logger);
}
return undefined;
}

@@ -68,0 +77,0 @@ }, {

3

package.json

@@ -17,3 +17,3 @@ {

"name": "ba-js-logger",
"version": "1.0.2",
"version": "1.1.0",
"files": [

@@ -26,2 +26,3 @@ "lib/"

"devDependencies": {
"axios": "^0.17.1",
"babel-cli": "^6.26.0",

@@ -28,0 +29,0 @@ "babel-eslint": "^7.2.3",

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