cli-chalk
v1.0.5
Published
a simple helper for cli and script console logs
Downloads
11
Maintainers
Readme
cli-chalk
helper for cli and script console logs
installation
npm i -D cli-chalk
usage
const log = require("cli-chalk");
log.config.name = "my-cli";
log.success("updated something!");
log.error("this is not right :(");
log.warn("im warning you...");
log.info("for your information");
fluent logger
const { logger } = require("cli-chalk");
const data = {
userId: 313
}
logger
.error("i have data")
.data("errorCode", -1000)
.data("timestamp", new Date())
.data("body", data)
.write();
config
{
name: "cli",
nameColor: chalk.bgBlue,
successColor: chalk.green,
errorColor: chalk.red,
warnColor: chalk.keyword('orange'),
infoColor: chalk.blue
}