You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
953 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.log = exports.Log = void 0;
class Log {
constructor(disabled) {
this.log = (message, ...optionalParams) => {
if (this.logger)
this.logger(message);
if (this.disabled)
return () => { };
return console.log(message, ...optionalParams);
};
this.error = (message, ...optionalParams) => {
if (this.logger)
this.logger(message);
if (this.disabled)
return () => { };
return console.error(message, ...optionalParams);
};
this.logger = (message) => { };
this.disabled = disabled || false;
}
get disabled() {
return this._disabled;
}
set disabled(val) {
this._disabled = val;
}
}
exports.Log = Log;
exports.log = new Log();
//# sourceMappingURL=log.js.map