ba-js-logger
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -40,3 +40,3 @@ 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; }; }(); | ||
function Logger(url, context, level) { | ||
function Logger(url, context, level, headers) { | ||
_classCallCheck(this, Logger); | ||
@@ -47,2 +47,3 @@ | ||
this.lvl = Logger.LEVEL(level); | ||
this.headers = headers; | ||
} | ||
@@ -60,7 +61,3 @@ | ||
key: 'postRequest', | ||
value: function postRequest(message) { | ||
var headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var level = arguments[2]; | ||
var logger = arguments[3]; | ||
value: function postRequest(message, headers, level, logger) { | ||
var endpoint = this.url + '/' + level; | ||
@@ -78,3 +75,3 @@ if (logger) { | ||
method: 'post', | ||
headers: headers, | ||
headers: headers || this.headers, | ||
data: params | ||
@@ -81,0 +78,0 @@ }); |
@@ -17,3 +17,3 @@ { | ||
"name": "ba-js-logger", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"files": [ | ||
@@ -20,0 +20,0 @@ "lib/" |
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
4753
106