export class Logger { private static logLevel: string; private static shouldDebugLog = false; private static shouldWarnLog = false; private static shouldErrorLog = false; static logDbg(...args: any): void { if (console && console.log && this.shouldDebugLog) { console.log(...args); } } static logWarn(...args: any): void { if (console && console.warn && this.shouldWarnLog) { console.warn(...args); } } static logError(...args: any): void { if (console && console.error && this.shouldErrorLog) { console.error(...args); } } static setLogLevel(logLevel: string): void { this.logLevel = logLevel; this.shouldDebugLog = this.logLevel === 'debug'; this.shouldWarnLog = this.logLevel === 'debug' || this.logLevel === 'warn' || this.logLevel === 'error'; this.shouldErrorLog = this.logLevel === 'debug' || this.logLevel === 'error'; } }