locklift
Version:
Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.
37 lines (36 loc) • 1.33 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.logger = void 0;
const chalk_1 = __importDefault(require("chalk"));
var Labels;
(function (Labels) {
Labels["INFO"] = "[INFO] ";
Labels["WARNING"] = "[WARNING] ";
Labels["ERROR"] = "[ERROR] ";
Labels["BUILDER_LOG"] = "[BUILDER] ";
Labels["DEPRECATED"] = "[DEPRECATED] ";
})(Labels || (Labels = {}));
class Logger {
printWarn(...params) {
console.log(chalk_1.default.yellow(Labels.WARNING), chalk_1.default.yellow(...params));
}
printError(...params) {
console.log(chalk_1.default.red(Labels.ERROR), chalk_1.default.red(...params));
}
printInfo(...params) {
console.log(chalk_1.default.blueBright(Labels.INFO), chalk_1.default.blueBright(...params));
}
printBuilderLog(...params) {
console.log(Labels.BUILDER_LOG, ...params);
}
printTracingLog(...params) {
console.log(...params);
}
deprecated({ instruction, methodName }) {
console.log(chalk_1.default.yellow(Labels.DEPRECATED), chalk_1.default.yellow(`${methodName} is deprecated. ${instruction}`));
}
}
exports.logger = new Logger();