Skip to content

boxman0617/pyx-log

Repository files navigation

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

About

Simple and pretty logging

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published