@decaf-ts/logging 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/logging.bundle.min.esm.js +1 -1
- package/dist/logging.bundle.min.js +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={563:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerFactory=void 0,t.LoggerFactory=class{constructor(e){this.level=e}}},640:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.NumericLogLevels=t.LogLevel=void 0,function(e){e.Fatal="fatal",e.Error="error",e.Warn="warn",e.Info="info",e.Http="http",e.Verbose="verbose",e.Debug="debug",e.Silly="silly"}(o||(t.LogLevel=o={})),t.NumericLogLevels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6}},760:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLoggerFactory=void 0;const r=o(563),s=o(640),l=o(552);class n{constructor(e,t,o){this.level=e,this.clazz=t,this.method=o}log(e,t,o,r){if((0,l.toLogLevel)(e)<(0,l.toLogLevel)(this.level))return;const{context:n,app:i}=o||{},a=`${r?`[${r}]`:""}${i?`[${i}]`:""}${n?`[${n}]`:""}${this.clazz?`[${this.clazz}]`:""}${this.method?`[${this.method}]`:""} ${t}`;switch(e){case s.LogLevel.Fatal:case s.LogLevel.Error:return console.error(a);case s.LogLevel.Warn:return console.warn(a);case s.LogLevel.Info:return console.info(a);case s.LogLevel.Http:case s.LogLevel.Verbose:case s.LogLevel.Debug:case s.LogLevel.Silly:return console.debug(a);default:throw new Error(`Invalid log level: ${e}`)}}silly(e,t,o){return this.log(s.LogLevel.Silly,e,t,o)}verbose(e,t,o){return this.log(s.LogLevel.Verbose,e,t,o)}debug(e,t,o){return this.log(s.LogLevel.Debug,e,t,o)}info(e,t,o){return this.log(s.LogLevel.Info,e,t,o)}warn(e,t,o){return this.log(s.LogLevel.Warn,e,t,o)}error(e,t,o){return this.log(s.LogLevel.Error,e,t,o)}emerg(e,t,o){return this.log(s.LogLevel.Fatal,e,t,o)}profile(e,t){throw new Error("Not implemented")}}class i extends r.LoggerFactory{constructor(e){super(e)}forClass(e){return new n(this.level,e.name)}forMethod(e,t){return new n(this.level,e.name,"string"==typeof t?t:t.name)}get(){return new n(this.level)}}t.DefaultLoggerFactory=i},729:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var s=Object.getOwnPropertyDescriptor(t,o);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,s)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),s=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,s(o(640),t),s(o(760),t),s(o(563),t),s(o(317),t),s(o(916),t),s(o(552),t),t.VERSION="0.0.
|
|
1
|
+
var e={563:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerFactory=void 0,t.LoggerFactory=class{constructor(e){this.level=e}}},640:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.NumericLogLevels=t.LogLevel=void 0,function(e){e.Fatal="fatal",e.Error="error",e.Warn="warn",e.Info="info",e.Http="http",e.Verbose="verbose",e.Debug="debug",e.Silly="silly"}(o||(t.LogLevel=o={})),t.NumericLogLevels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6}},760:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLoggerFactory=void 0;const r=o(563),s=o(640),l=o(552);class n{constructor(e,t,o){this.level=e,this.clazz=t,this.method=o}log(e,t,o,r){if((0,l.toLogLevel)(e)<(0,l.toLogLevel)(this.level))return;const{context:n,app:i}=o||{},a=`${r?`[${r}]`:""}${i?`[${i}]`:""}${n?`[${n}]`:""}${this.clazz?`[${this.clazz}]`:""}${this.method?`[${this.method}]`:""} ${t}`;switch(e){case s.LogLevel.Fatal:case s.LogLevel.Error:return console.error(a);case s.LogLevel.Warn:return console.warn(a);case s.LogLevel.Info:return console.info(a);case s.LogLevel.Http:case s.LogLevel.Verbose:case s.LogLevel.Debug:case s.LogLevel.Silly:return console.debug(a);default:throw new Error(`Invalid log level: ${e}`)}}silly(e,t,o){return this.log(s.LogLevel.Silly,e,t,o)}verbose(e,t,o){return this.log(s.LogLevel.Verbose,e,t,o)}debug(e,t,o){return this.log(s.LogLevel.Debug,e,t,o)}info(e,t,o){return this.log(s.LogLevel.Info,e,t,o)}warn(e,t,o){return this.log(s.LogLevel.Warn,e,t,o)}error(e,t,o){return this.log(s.LogLevel.Error,e,t,o)}emerg(e,t,o){return this.log(s.LogLevel.Fatal,e,t,o)}profile(e,t){throw new Error("Not implemented")}}class i extends r.LoggerFactory{constructor(e){super(e)}forClass(e){return new n(this.level,e.name)}forMethod(e,t){return new n(this.level,e.name,"string"==typeof t?t:t.name)}get(){return new n(this.level)}}t.DefaultLoggerFactory=i},729:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var s=Object.getOwnPropertyDescriptor(t,o);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,s)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),s=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,s(o(640),t),s(o(760),t),s(o(563),t),s(o(317),t),s(o(916),t),s(o(552),t),t.VERSION="0.0.15"},317:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},916:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Logging=void 0;const r=o(640),s=o(760);class l{static{this._level=r.LogLevel.Info}static{this._factory=s.DefaultLoggerFactory}static{this.cacheByClass={}}static{this.cacheByClassMethod={}}constructor(){}static get level(){return this._level}static set level(e){this._level=e}static get instance(){return this._instance||(this._instance=new this._factory(l.level)),this._instance}static set factory(e){this._factory=e}static forClass(e){const t=e.name;return t in this.cacheByClass||(this.cacheByClass[t]=l.instance.forClass(e)),this.cacheByClass[t]}static forMethod(e,t){const o=e.name;o in this.cacheByClassMethod||(this.cacheByClassMethod[o]={});const r="string"==typeof t?t:t.name;return r in this.cacheByClassMethod[o]||(this.cacheByClassMethod[o][r]=l.instance.forMethod(e,t)),this.cacheByClassMethod[o][r]}static get(){return this.global||(this.global=l.instance.get()),this.global}}t.Logging=l},552:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toLogLevel=function(e){if(e.toString()in r.NumericLogLevels)return r.NumericLogLevels[e.toString()];throw new Error(`Invalid level: ${e.toString()}`)};const r=o(640)}},t={};!function o(r){var s=t[r];if(void 0!==s)return s.exports;var l=t[r]={exports:{}};return e[r].call(l.exports,l,l.exports,o),l.exports}(729);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("logging",[],t):"object"==typeof exports?exports.logging=t():e.logging=t()}(this,(()=>(()=>{"use strict";var e={563:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerFactory=void 0,t.LoggerFactory=class{constructor(e){this.level=e}}},640:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.NumericLogLevels=t.LogLevel=void 0,function(e){e.Fatal="fatal",e.Error="error",e.Warn="warn",e.Info="info",e.Http="http",e.Verbose="verbose",e.Debug="debug",e.Silly="silly"}(o||(t.LogLevel=o={})),t.NumericLogLevels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6}},760:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLoggerFactory=void 0;const r=o(563),s=o(640),l=o(552);class n{constructor(e,t,o){this.level=e,this.clazz=t,this.method=o}log(e,t,o,r){if((0,l.toLogLevel)(e)<(0,l.toLogLevel)(this.level))return;const{context:n,app:i}=o||{},a=`${r?`[${r}]`:""}${i?`[${i}]`:""}${n?`[${n}]`:""}${this.clazz?`[${this.clazz}]`:""}${this.method?`[${this.method}]`:""} ${t}`;switch(e){case s.LogLevel.Fatal:case s.LogLevel.Error:return console.error(a);case s.LogLevel.Warn:return console.warn(a);case s.LogLevel.Info:return console.info(a);case s.LogLevel.Http:case s.LogLevel.Verbose:case s.LogLevel.Debug:case s.LogLevel.Silly:return console.debug(a);default:throw new Error(`Invalid log level: ${e}`)}}silly(e,t,o){return this.log(s.LogLevel.Silly,e,t,o)}verbose(e,t,o){return this.log(s.LogLevel.Verbose,e,t,o)}debug(e,t,o){return this.log(s.LogLevel.Debug,e,t,o)}info(e,t,o){return this.log(s.LogLevel.Info,e,t,o)}warn(e,t,o){return this.log(s.LogLevel.Warn,e,t,o)}error(e,t,o){return this.log(s.LogLevel.Error,e,t,o)}emerg(e,t,o){return this.log(s.LogLevel.Fatal,e,t,o)}profile(e,t){throw new Error("Not implemented")}}class i extends r.LoggerFactory{constructor(e){super(e)}forClass(e){return new n(this.level,e.name)}forMethod(e,t){return new n(this.level,e.name,"string"==typeof t?t:t.name)}get(){return new n(this.level)}}t.DefaultLoggerFactory=i},729:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var s=Object.getOwnPropertyDescriptor(t,o);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,s)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),s=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,s(o(640),t),s(o(760),t),s(o(563),t),s(o(317),t),s(o(916),t),s(o(552),t),t.VERSION="0.0.
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("logging",[],t):"object"==typeof exports?exports.logging=t():e.logging=t()}(this,(()=>(()=>{"use strict";var e={563:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerFactory=void 0,t.LoggerFactory=class{constructor(e){this.level=e}}},640:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.NumericLogLevels=t.LogLevel=void 0,function(e){e.Fatal="fatal",e.Error="error",e.Warn="warn",e.Info="info",e.Http="http",e.Verbose="verbose",e.Debug="debug",e.Silly="silly"}(o||(t.LogLevel=o={})),t.NumericLogLevels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6}},760:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLoggerFactory=void 0;const r=o(563),s=o(640),l=o(552);class n{constructor(e,t,o){this.level=e,this.clazz=t,this.method=o}log(e,t,o,r){if((0,l.toLogLevel)(e)<(0,l.toLogLevel)(this.level))return;const{context:n,app:i}=o||{},a=`${r?`[${r}]`:""}${i?`[${i}]`:""}${n?`[${n}]`:""}${this.clazz?`[${this.clazz}]`:""}${this.method?`[${this.method}]`:""} ${t}`;switch(e){case s.LogLevel.Fatal:case s.LogLevel.Error:return console.error(a);case s.LogLevel.Warn:return console.warn(a);case s.LogLevel.Info:return console.info(a);case s.LogLevel.Http:case s.LogLevel.Verbose:case s.LogLevel.Debug:case s.LogLevel.Silly:return console.debug(a);default:throw new Error(`Invalid log level: ${e}`)}}silly(e,t,o){return this.log(s.LogLevel.Silly,e,t,o)}verbose(e,t,o){return this.log(s.LogLevel.Verbose,e,t,o)}debug(e,t,o){return this.log(s.LogLevel.Debug,e,t,o)}info(e,t,o){return this.log(s.LogLevel.Info,e,t,o)}warn(e,t,o){return this.log(s.LogLevel.Warn,e,t,o)}error(e,t,o){return this.log(s.LogLevel.Error,e,t,o)}emerg(e,t,o){return this.log(s.LogLevel.Fatal,e,t,o)}profile(e,t){throw new Error("Not implemented")}}class i extends r.LoggerFactory{constructor(e){super(e)}forClass(e){return new n(this.level,e.name)}forMethod(e,t){return new n(this.level,e.name,"string"==typeof t?t:t.name)}get(){return new n(this.level)}}t.DefaultLoggerFactory=i},729:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var s=Object.getOwnPropertyDescriptor(t,o);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,s)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),s=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,s(o(640),t),s(o(760),t),s(o(563),t),s(o(317),t),s(o(916),t),s(o(552),t),t.VERSION="0.0.15"},317:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},916:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Logging=void 0;const r=o(640),s=o(760);class l{static{this._level=r.LogLevel.Info}static{this._factory=s.DefaultLoggerFactory}static{this.cacheByClass={}}static{this.cacheByClassMethod={}}constructor(){}static get level(){return this._level}static set level(e){this._level=e}static get instance(){return this._instance||(this._instance=new this._factory(l.level)),this._instance}static set factory(e){this._factory=e}static forClass(e){const t=e.name;return t in this.cacheByClass||(this.cacheByClass[t]=l.instance.forClass(e)),this.cacheByClass[t]}static forMethod(e,t){const o=e.name;o in this.cacheByClassMethod||(this.cacheByClassMethod[o]={});const r="string"==typeof t?t:t.name;return r in this.cacheByClassMethod[o]||(this.cacheByClassMethod[o][r]=l.instance.forMethod(e,t)),this.cacheByClassMethod[o][r]}static get(){return this.global||(this.global=l.instance.get()),this.global}}t.Logging=l},552:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toLogLevel=function(e){if(e.toString()in r.NumericLogLevels)return r.NumericLogLevels[e.toString()];throw new Error(`Invalid level: ${e.toString()}`)};const r=o(640)}},t={};return function o(r){var s=t[r];if(void 0!==s)return s.exports;var l=t[r]={exports:{}};return e[r].call(l.exports,l,l.exports,o),l.exports}(729)})()));
|
package/lib/esm/index.d.ts
CHANGED
package/lib/esm/index.js
CHANGED
|
@@ -21,6 +21,6 @@ export * from "./utils";
|
|
|
21
21
|
* @const VERSION
|
|
22
22
|
* @memberOf module:ts-workspace
|
|
23
23
|
*/
|
|
24
|
-
export const VERSION = "0.0.
|
|
24
|
+
export const VERSION = "0.0.15";
|
|
25
25
|
|
|
26
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
26
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLFdBQVcsQ0FBQztBQUMxQixjQUFjLFdBQVcsQ0FBQztBQUMxQixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLFdBQVcsQ0FBQztBQUMxQixjQUFjLFNBQVMsQ0FBQztBQUV4Qjs7OztHQUlHO0FBRUg7Ozs7O0dBS0c7QUFFSDs7Ozs7R0FLRztBQUNILE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxRQUFRLENBQUMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLi9jb25zdGFudHNcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2RlZmF1bHRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL0ZhY3RvcnlcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2ludGVyZmFjZXNcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xvZ2dpbmdcIjtcbmV4cG9ydCAqIGZyb20gXCIuL3V0aWxzXCI7XG5cbi8qKlxuICogQHN1bW1hcnkgTW9kdWxlIHN1bW1hcnlcbiAqIEBkZXNjcmlwdGlvbiBNb2R1bGUgZGVzY3JpcHRpb25cbiAqIEBtb2R1bGUgTG9nZ2luZ1xuICovXG5cbi8qKlxuICogQHN1bW1hcnkgTG9nZ2luZ1xuICogQGRlc2NyaXB0aW9uIE5hbWVzcGFjZSBkZXNjcmlwdGlvblxuICogQG5hbWVzcGFjZSBMb2dnaW5nXG4gKiBAbWVtYmVyT2YgbW9kdWxlOkxvZ2dpbmdcbiAqL1xuXG4vKipcbiAqIEBzdW1tYXJ5IHN0b3JlcyB0aGUgY3VycmVudCBwYWNrYWdlIHZlcnNpb25cbiAqIEBkZXNjcmlwdGlvbiB0aGlzIGlzIGhvdyB5b3Ugc2hvdWxkIGRvY3VtZW50IGEgY29uc3RhbnRcbiAqIEBjb25zdCBWRVJTSU9OXG4gKiBAbWVtYmVyT2YgbW9kdWxlOnRzLXdvcmtzcGFjZVxuICovXG5leHBvcnQgY29uc3QgVkVSU0lPTiA9IFwiMC4wLjE1XCI7XG4iXX0=
|
package/lib/index.cjs
CHANGED
package/lib/index.d.ts
CHANGED