1.0.9 • Published 3 years ago
@arrdev/cli-tools v1.0.9
cli-tools
Better logging to the terminal
- Note: requires node.js
Install
Just run\
npm i --save @arrdev/cli-tools
Example
const cl = require("@arrdev/cli-tools");
let text = "Testing...";
// allows for a more customizable logging
cl.logger.log(text, text, 0x333);
// prints in white with the event of CMD
cl.logger.cmd(text);
// prints in blue with the event of DEBUG
cl.logger.debug(text);
// prints in red with the event of ERROR
cl.logger.error(text);
// prints in cyan with the event of EVENT
cl.logger.event(text);
// prints in gray with the event of LOAD
cl.logger.load(text);
// prints in green with the event of READY
cl.logger.ready(text);
// prints in yellow with the event of TEST
cl.logger.test(text);
// prints in orange with the event of WARN
cl.logger.warn(text);
Options
- .log(data, type, hex);
- .cmd(data);
- .debug(data);
- .error(data);
- .event(data);
- .load(data);
- .ready(data);
- .test(data);
- .warn(data);
- Note: more options will be added
Credit
I got the idea from Apolency, without them, I wouldn't be making this!