@jsenv/log
v3.5.2
Published
Nice and dynamic logs in the terminal
Downloads
211
Readme
Log
This packages is used by jsenv to create beautiful logs in the console. It is available as a standalone package to be used in other contexts.
This package helps to:
- add symbols via unicode
- make dynamic logs
- add color to logs
Task log example
(Click image to play the gif)
Code used to produce these logs:
import { createTaskLog } from "@jsenv/log";
const task = createTaskLog("Doing something");
setTimeout(() => {
task.done();
}, 1_000);
Unicode example
Code used to produce these logs:
import { UNICODE } from "@jsenv/log";
console.log(`${UNICODE.COMMAND} cd dir/`);
console.log(`${UNICODE.DEBUG} debug`);
console.log(`${UNICODE.INFO} info`);
console.log(`${UNICODE.WARNING} warning`);
console.log(`${UNICODE.FAILURE} failure`);
console.log(`${UNICODE.OK} ok`);
Installation
npm install @jsenv/log