1.0.1 • Published 7 years ago

pyx-log v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

PyxLog

Simple and pretty logging

CircleCI npm Codacy Badge Codacy Badge

Install

$ npm i --save pyx-log # To save a dependency
$ npm i --save-dev pyx-log # To save as dev dependency

Usage

/**
 * Run this like so:
 * $ node example.js
 * Then run in debug mode like so:
 * $ DEBUG_MODE=true node example.js
 */

const PyxLog = require('./index');
const me = PyxLog.create('Me');
const world = PyxLog.create('World');

me.header('Initializing World Domination');
// ... code that starts world domination ...
me.log('Worlds: 1');
me.debug('Is world worth dominating?', true);
world.header('Initializing World Domination Defence Measures');
me.alert('WORLD IS RESISTING');
me.header('Initializing Offencive Measures');
me.beSilent();
for (let i = 0; i < 100; i += 1) {
	me.log('FIRE!');
}
me.beNormal();
world.log('...');
world.debug('Is world over?', '???');

Output

PyxLog Output

Docs

Docs - This README.md file API - The API docs for the PyxLog class

License

MIT © Alan Tirado

1.0.1

7 years ago

1.0.0

8 years ago