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

@pnp/logging

Package Overview
Dependencies
Maintainers
6
Versions
1069
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnp/logging - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

26

dist/logging.es5.js
/**
@license
* @pnp/logging v1.0.5 - pnp - light-weight, subscribable logging framework
* @pnp/logging v1.1.0 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -72,6 +72,6 @@ * Copyright (c) 2018 Microsoft

* @param message The message to write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
Logger.write = function (message, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
Logger.instance.log({ level: level, message: message });

@@ -83,6 +83,6 @@ };

* @param json The json object to stringify and write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
Logger.writeJSON = function (json, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
Logger.instance.log({ level: level, message: JSON.stringify(json) });

@@ -131,3 +131,3 @@ };

LoggerImpl.prototype.write = function (message, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
this.log({ level: level, message: message });

@@ -144,2 +144,14 @@ };

/**
* A set of logging levels
*/
var LogLevel;
(function (LogLevel) {
LogLevel[LogLevel["Verbose"] = 0] = "Verbose";
LogLevel[LogLevel["Info"] = 1] = "Info";
LogLevel[LogLevel["Warning"] = 2] = "Warning";
LogLevel[LogLevel["Error"] = 3] = "Error";
LogLevel[LogLevel["Off"] = 99] = "Off";
})(LogLevel || (LogLevel = {}));
/**
* Implementation of LogListener which logs to the console

@@ -211,3 +223,3 @@ *

export { Logger, ConsoleListener, FunctionListener };
export { Logger, LogLevel, ConsoleListener, FunctionListener };
//# sourceMappingURL=logging.es5.js.map
/**
@license
* @pnp/logging v1.0.5 - pnp - light-weight, subscribable logging framework
* @pnp/logging v1.1.0 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -92,3 +92,4 @@ * Copyright (c) 2018 Microsoft

/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_logging__ = __webpack_require__(1);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return __WEBPACK_IMPORTED_MODULE_0__src_logging__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return __WEBPACK_IMPORTED_MODULE_0__src_logging__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "LogLevel", function() { return __WEBPACK_IMPORTED_MODULE_0__src_logging__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "ConsoleListener", function() { return __WEBPACK_IMPORTED_MODULE_0__src_logging__["a"]; });

@@ -105,8 +106,11 @@ /* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "FunctionListener", function() { return __WEBPACK_IMPORTED_MODULE_0__src_logging__["b"]; });

/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__logger__ = __webpack_require__(2);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__logger__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listeners__ = __webpack_require__(3);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__listeners__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__listeners__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__logger__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__loglevel__ = __webpack_require__(3);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__loglevel__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listeners__ = __webpack_require__(4);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__listeners__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__listeners__["b"]; });
//# sourceMappingURL=logging.js.map

@@ -182,6 +186,6 @@

* @param message The message to write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
Logger.write = function (message, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
Logger.instance.log({ level: level, message: message });

@@ -193,6 +197,6 @@ };

* @param json The json object to stringify and write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
Logger.writeJSON = function (json, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
Logger.instance.log({ level: level, message: JSON.stringify(json) });

@@ -242,3 +246,3 @@ };

LoggerImpl.prototype.write = function (message, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
this.log({ level: level, message: message });

@@ -260,2 +264,21 @@ };

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LogLevel; });
/**
* A set of logging levels
*/
var LogLevel;
(function (LogLevel) {
LogLevel[LogLevel["Verbose"] = 0] = "Verbose";
LogLevel[LogLevel["Info"] = 1] = "Info";
LogLevel[LogLevel["Warning"] = 2] = "Warning";
LogLevel[LogLevel["Error"] = 3] = "Error";
LogLevel[LogLevel["Off"] = 99] = "Off";
})(LogLevel || (LogLevel = {}));
//# sourceMappingURL=loglevel.js.map
/***/ }),
/* 4 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ConsoleListener; });

@@ -262,0 +285,0 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return FunctionListener; });

/**
@license
* @pnp/logging v1.0.5 - pnp - light-weight, subscribable logging framework
* @pnp/logging v1.1.0 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -10,3 +10,3 @@ * Copyright (c) 2018 Microsoft

*/
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.pnp=n():e.pnp=n()}("undefined"!=typeof self?self:this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=0)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(1);t.d(n,"Logger",function(){return r.c}),t.d(n,"ConsoleListener",function(){return r.a}),t.d(n,"FunctionListener",function(){return r.b})},function(e,n,t){"use strict";var r=t(2);t.d(n,"c",function(){return r.a});var o=t(3);t.d(n,"a",function(){return o.a}),t.d(n,"b",function(){return o.b})},function(e,n,t){"use strict";t.d(n,"a",function(){return r});var r=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(n){e.instance.activeLogLevel=n},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new o),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];n.map(function(n){return e.instance.subscribe(n)})},e.clearSubscribers=function(){return e.instance.clearSubscribers()},Object.defineProperty(e,"count",{get:function(){return e.instance.count},enumerable:!0,configurable:!0}),e.write=function(n,t){void 0===t&&(t=0),e.instance.log({level:t,message:n})},e.writeJSON=function(n,t){void 0===t&&(t=0),e.instance.log({level:t,message:JSON.stringify(n)})},e.log=function(n){e.instance.log(n)},e.error=function(n){e.instance.log({data:n,level:3,message:n.message})},e}(),o=function(){function e(e,n){void 0===e&&(e=2),void 0===n&&(n=[]),this.activeLogLevel=e,this.subscribers=n}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,n){void 0===n&&(n=0),this.log({level:n,message:e})},e.prototype.log=function(e){void 0!==e&&this.activeLogLevel<=e.level&&this.subscribers.map(function(n){return n.log(e)})},e}()},function(e,n,t){"use strict";t.d(n,"a",function(){return r}),t.d(n,"b",function(){return o});var r=function(){function e(){}return e.prototype.log=function(e){var n=this.format(e);switch(e.level){case 0:case 1:console.log(n);break;case 2:console.warn(n);break;case 3:console.error(n)}},e.prototype.format=function(e){var n=[];return n.push("Message: "+e.message),void 0!==e.data&&n.push(" Data: "+JSON.stringify(e.data)),n.join("")},e}(),o=function(){function e(e){this.method=e}return e.prototype.log=function(e){this.method(e)},e}()}])});
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.pnp=n():e.pnp=n()}("undefined"!=typeof self?self:this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=0)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(1);t.d(n,"Logger",function(){return r.d}),t.d(n,"LogLevel",function(){return r.c}),t.d(n,"ConsoleListener",function(){return r.a}),t.d(n,"FunctionListener",function(){return r.b})},function(e,n,t){"use strict";var r=t(2);t.d(n,"d",function(){return r.a});var o=t(3);t.d(n,"c",function(){return o.a});var i=t(4);t.d(n,"a",function(){return i.a}),t.d(n,"b",function(){return i.b})},function(e,n,t){"use strict";t.d(n,"a",function(){return r});var r=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(n){e.instance.activeLogLevel=n},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new o),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];n.map(function(n){return e.instance.subscribe(n)})},e.clearSubscribers=function(){return e.instance.clearSubscribers()},Object.defineProperty(e,"count",{get:function(){return e.instance.count},enumerable:!0,configurable:!0}),e.write=function(n,t){void 0===t&&(t=1),e.instance.log({level:t,message:n})},e.writeJSON=function(n,t){void 0===t&&(t=1),e.instance.log({level:t,message:JSON.stringify(n)})},e.log=function(n){e.instance.log(n)},e.error=function(n){e.instance.log({data:n,level:3,message:n.message})},e}(),o=function(){function e(e,n){void 0===e&&(e=2),void 0===n&&(n=[]),this.activeLogLevel=e,this.subscribers=n}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,n){void 0===n&&(n=1),this.log({level:n,message:e})},e.prototype.log=function(e){void 0!==e&&this.activeLogLevel<=e.level&&this.subscribers.map(function(n){return n.log(e)})},e}()},function(e,n,t){"use strict";t.d(n,"a",function(){return r});var r;!function(e){e[e.Verbose=0]="Verbose",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Off=99]="Off"}(r||(r={}))},function(e,n,t){"use strict";t.d(n,"a",function(){return r}),t.d(n,"b",function(){return o});var r=function(){function e(){}return e.prototype.log=function(e){var n=this.format(e);switch(e.level){case 0:case 1:console.log(n);break;case 2:console.warn(n);break;case 3:console.error(n)}},e.prototype.format=function(e){var n=[];return n.push("Message: "+e.message),void 0!==e.data&&n.push(" Data: "+JSON.stringify(e.data)),n.join("")},e}(),o=function(){function e(e){this.method=e}return e.prototype.log=function(e){this.method(e)},e}()}])});
//# sourceMappingURL=logging.es5.umd.bundle.min.js.map
/**
@license
* @pnp/logging v1.0.5 - pnp - light-weight, subscribable logging framework
* @pnp/logging v1.1.0 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -78,6 +78,6 @@ * Copyright (c) 2018 Microsoft

* @param message The message to write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
Logger.write = function (message, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
Logger.instance.log({ level: level, message: message });

@@ -89,6 +89,6 @@ };

* @param json The json object to stringify and write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
Logger.writeJSON = function (json, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
Logger.instance.log({ level: level, message: JSON.stringify(json) });

@@ -137,3 +137,3 @@ };

LoggerImpl.prototype.write = function (message, level) {
if (level === void 0) { level = 0 /* Verbose */; }
if (level === void 0) { level = 1 /* Info */; }
this.log({ level: level, message: message });

@@ -150,2 +150,13 @@ };

/**
* A set of logging levels
*/
(function (LogLevel) {
LogLevel[LogLevel["Verbose"] = 0] = "Verbose";
LogLevel[LogLevel["Info"] = 1] = "Info";
LogLevel[LogLevel["Warning"] = 2] = "Warning";
LogLevel[LogLevel["Error"] = 3] = "Error";
LogLevel[LogLevel["Off"] = 99] = "Off";
})(exports.LogLevel || (exports.LogLevel = {}));
/**
* Implementation of LogListener which logs to the console

@@ -152,0 +163,0 @@ *

/**
@license
* @pnp/logging v1.0.5 - pnp - light-weight, subscribable logging framework
* @pnp/logging v1.1.0 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -10,2 +10,2 @@ * Copyright (c) 2018 Microsoft

*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e.pnp=e.pnp||{},e.pnp.logging={}))}(this,function(e){"use strict";var n=function(){function t(){}return Object.defineProperty(t,"activeLogLevel",{get:function(){return t.instance.activeLogLevel},set:function(e){t.instance.activeLogLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"instance",{get:function(){return null==t._instance&&(t._instance=new o),t._instance},enumerable:!0,configurable:!0}),t.subscribe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.map(function(e){return t.instance.subscribe(e)})},t.clearSubscribers=function(){return t.instance.clearSubscribers()},Object.defineProperty(t,"count",{get:function(){return t.instance.count},enumerable:!0,configurable:!0}),t.write=function(e,n){void 0===n&&(n=0),t.instance.log({level:n,message:e})},t.writeJSON=function(e,n){void 0===n&&(n=0),t.instance.log({level:n,message:JSON.stringify(e)})},t.log=function(e){t.instance.log(e)},t.error=function(e){t.instance.log({data:e,level:3,message:e.message})},t}(),o=function(){function e(e,n){void 0===e&&(e=2),void 0===n&&(n=[]),this.activeLogLevel=e,this.subscribers=n}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,n){void 0===n&&(n=0),this.log({level:n,message:e})},e.prototype.log=function(n){void 0!==n&&this.activeLogLevel<=n.level&&this.subscribers.map(function(e){return e.log(n)})},e}(),t=function(){function e(){}return e.prototype.log=function(e){var n=this.format(e);switch(e.level){case 0:case 1:console.log(n);break;case 2:console.warn(n);break;case 3:console.error(n)}},e.prototype.format=function(e){var n=[];return n.push("Message: "+e.message),void 0!==e.data&&n.push(" Data: "+JSON.stringify(e.data)),n.join("")},e}(),i=function(){function e(e){this.method=e}return e.prototype.log=function(e){this.method(e)},e}();e.Logger=n,e.ConsoleListener=t,e.FunctionListener=i,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e.pnp=e.pnp||{},e.pnp.logging={}))}(this,function(e){"use strict";var n,t=function(){function t(){}return Object.defineProperty(t,"activeLogLevel",{get:function(){return t.instance.activeLogLevel},set:function(e){t.instance.activeLogLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"instance",{get:function(){return null==t._instance&&(t._instance=new o),t._instance},enumerable:!0,configurable:!0}),t.subscribe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.map(function(e){return t.instance.subscribe(e)})},t.clearSubscribers=function(){return t.instance.clearSubscribers()},Object.defineProperty(t,"count",{get:function(){return t.instance.count},enumerable:!0,configurable:!0}),t.write=function(e,n){void 0===n&&(n=1),t.instance.log({level:n,message:e})},t.writeJSON=function(e,n){void 0===n&&(n=1),t.instance.log({level:n,message:JSON.stringify(e)})},t.log=function(e){t.instance.log(e)},t.error=function(e){t.instance.log({data:e,level:3,message:e.message})},t}(),o=function(){function e(e,n){void 0===e&&(e=2),void 0===n&&(n=[]),this.activeLogLevel=e,this.subscribers=n}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,n){void 0===n&&(n=1),this.log({level:n,message:e})},e.prototype.log=function(n){void 0!==n&&this.activeLogLevel<=n.level&&this.subscribers.map(function(e){return e.log(n)})},e}();(n=e.LogLevel||(e.LogLevel={}))[n.Verbose=0]="Verbose",n[n.Info=1]="Info",n[n.Warning=2]="Warning",n[n.Error=3]="Error",n[n.Off=99]="Off";var r=function(){function e(){}return e.prototype.log=function(e){var n=this.format(e);switch(e.level){case 0:case 1:console.log(n);break;case 2:console.warn(n);break;case 3:console.error(n)}},e.prototype.format=function(e){var n=[];return n.push("Message: "+e.message),void 0!==e.data&&n.push(" Data: "+JSON.stringify(e.data)),n.join("")},e}(),i=function(){function e(e){this.method=e}return e.prototype.log=function(e){this.method(e)},e}();e.Logger=t,e.ConsoleListener=r,e.FunctionListener=i,Object.defineProperty(e,"__esModule",{value:!0})});
/**
@license
* @pnp/logging v1.0.5 - pnp - light-weight, subscribable logging framework
* @pnp/logging v1.1.0 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -54,5 +54,5 @@ * Copyright (c) 2018 Microsoft

* @param message The message to write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
static write(message, level = 0 /* Verbose */) {
static write(message, level = 1 /* Info */) {
Logger.instance.log({ level: level, message: message });

@@ -64,5 +64,5 @@ }

* @param json The json object to stringify and write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/
static writeJSON(json, level = 0 /* Verbose */) {
static writeJSON(json, level = 1 /* Info */) {
Logger.instance.log({ level: level, message: JSON.stringify(json) });

@@ -103,3 +103,3 @@ }

}
write(message, level = 0 /* Verbose */) {
write(message, level = 1 /* Info */) {
this.log({ level: level, message: message });

@@ -115,2 +115,14 @@ }

/**
* A set of logging levels
*/
var LogLevel;
(function (LogLevel) {
LogLevel[LogLevel["Verbose"] = 0] = "Verbose";
LogLevel[LogLevel["Info"] = 1] = "Info";
LogLevel[LogLevel["Warning"] = 2] = "Warning";
LogLevel[LogLevel["Error"] = 3] = "Error";
LogLevel[LogLevel["Off"] = 99] = "Off";
})(LogLevel || (LogLevel = {}));
/**
* Implementation of LogListener which logs to the console

@@ -178,3 +190,3 @@ *

export { Logger, ConsoleListener, FunctionListener };
export { Logger, LogLevel, ConsoleListener, FunctionListener };
//# sourceMappingURL=logging.js.map
{
"name": "@pnp/logging",
"version": "1.0.5",
"version": "1.1.0",
"description": "pnp - light-weight, subscribable logging framework",

@@ -8,3 +8,3 @@ "main": "./dist/logging.es5.umd.js",

"dependencies": {
"tslib": "1.9.0"
"tslib": "1.9.1"
},

@@ -11,0 +11,0 @@ "author": {

@@ -1,4 +0,4 @@

import { LogLevel } from "./loglevel";
import { LogListener } from "./listeners";
import { LogEntry } from "./logentry";
import { LogLevel } from "./loglevel";
/**

@@ -33,3 +33,3 @@ * Class used to subscribe ILogListener and log messages throughout an application

* @param message The message to write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/

@@ -41,3 +41,3 @@ static write(message: string, level?: LogLevel): void;

* @param json The json object to stringify and write
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)
* @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)
*/

@@ -44,0 +44,0 @@ static writeJSON(json: any, level?: LogLevel): void;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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