cli-chalk

1.0.5 • Public • Published

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");

example-image

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();

fluent-image

config

{
    name: "cli",
    nameColor: chalk.bgBlue,
    successColor: chalk.green,
    errorColor: chalk.red,
    warnColor: chalk.keyword('orange'),
    infoColor: chalk.blue
}

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i cli-chalk

    Weekly Downloads

    1

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    52.2 kB

    Total Files

    11

    Last publish

    Collaborators

    • amerani