@senx/discovery-widgets
Version:
Discovery Widgets Elements
2 lines • 747 B
JavaScript
class s{constructor(s,e=false){this.isDebug=false;this.className=s.name;this.isDebug=e}log(s,t,o){let a=[];a.push(`[${(new Date).toISOString()} - [${this.className}] ${t.join(" - ")}`);a=a.concat(o);switch(s){case e.DEBUG:{if(this.isDebug){console.debug(...a)}break}case e.ERROR:{console.error(...a);break}case e.INFO:{console.log(...a);break}case e.WARN:{console.warn(...a);break}default:{if(this.isDebug){console.log(...a)}}}}debug(s,...t){this.log(e.DEBUG,s,t)}error(s,...t){this.log(e.ERROR,s,t)}warn(s,...t){this.log(e.WARN,s,t)}info(s,...t){this.log(e.INFO,s,t)}}var e;(function(s){s[s["DEBUG"]=0]="DEBUG";s[s["ERROR"]=1]="ERROR";s[s["WARN"]=2]="WARN";s[s["INFO"]=3]="INFO"})(e||(e={}));export{s as L};
//# sourceMappingURL=p-8dac2055.js.map