@jsenv/log

3.5.2 • Public • Published

Log npm package

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)

img

Code used to produce these logs:

import { createTaskLog } from "@jsenv/log";

const task = createTaskLog("Doing something");
setTimeout(() => {
  task.done();
}, 1_000);

Unicode example

img

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

Readme

Keywords

none

Package Sidebar

Install

npm i @jsenv/log

Weekly Downloads

135

Version

3.5.2

License

MIT

Unpacked Size

15 kB

Total Files

11

Last publish

Collaborators

  • jsenv-admin
  • dmail