2018-10-04 15:30:59 +03:00
|
|
|
const chalk = require('chalk');
|
|
|
|
const log = (...args) => console.log(...args); // eslint-disable-line no-console
|
|
|
|
|
|
|
|
module.exports.log = log;
|
2019-03-10 18:08:53 +03:00
|
|
|
|
|
|
|
module.exports.log.ok = (...args) => {
|
|
|
|
log(chalk.green('ok'), ...args);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.log.trace = (...args) => {
|
|
|
|
log(chalk.gray('trace'), ...args);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.log.debug = (...args) => {
|
|
|
|
log(chalk.gray('debug'), ...args);
|
2018-10-04 15:30:59 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.log.info = (...args) => {
|
|
|
|
log(chalk.cyan('info'), ...args);
|
|
|
|
};
|
|
|
|
|
2019-03-10 18:08:53 +03:00
|
|
|
module.exports.log.warn = (...args) => {
|
2020-10-15 20:07:14 +03:00
|
|
|
log(chalk.magenta('warn'), ...args);
|
2019-03-10 18:08:53 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.log.error = (...args) => {
|
|
|
|
log(chalk.red('error'), ...args);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.log.fatal = (...args) => {
|
|
|
|
log(chalk.inverse('fatal'), ...args);
|
2018-10-04 15:30:59 +03:00
|
|
|
};
|