orz-logit

0.6.0 • Public • Published

logIt

A colorful logging utility to help you with Node.js application debugging alt tag

To Install

Use npm:

$ npm install orz-logit

To Use

1. Import to top of the file:

const { LogIt, ErrorIt } = require('logIt');

2. Define the debug flag, title, mark and color (you can also set 'len' to change the length of repeating marks, default is 60):

const logIt = LogIt(true, { title: 'Test', mark:'=', color:'green' });

3. Then just call it like console.log:

if (error) {
  logIt(error);
}

4. Set debug flag to false to turn off all logging, no comments needed:

const logIt = LogIt(false, { title: 'Test', mark:'=', color:'green' });

Text colors are dependent of colors module done by Marak

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • gray
  • grey

Readme

Keywords

Package Sidebar

Install

npm i orz-logit

Weekly Downloads

0

Version

0.6.0

License

MIT

Last publish

Collaborators

  • orange-beans