@fizzygalacticus/colored-fancy-log
v1.0.0
Published
fancy-log but with colors!
Readme
colored-fancy-log
fancy-log but with colors!
Uses fancy-log and colors to create time-stamped, colored, and (optionally) named loggers.
Installation
Using npm:
npm i --save @fizzygalacticus/colored-fancy-logUsing yarn:
yarn add --save @fizzygalacticus/colored-fancy-logUsage
By default, colored-fancy-log exports a logger with no name to be used immediately:
const logger = require('@fizzygalacticus/colored-fancy-log');
logger.success('Hello, world!');Output:

To name a logger:
const { getLogger } = require('@fizzygalacticus/colored-fancy-log');
const logger = getLogger({ name: 'test-logger' });
logger.success('Hello, world!');Output:

Don't like the default name <-> message separator? You can change that too!
const { getLogger } = require('@fizzygalacticus/colored-fancy-log');
const logger = getLogger({ name: 'test-logger', separator: '=>' });
logger.success('Hello, world!');Output:

Available Functions
| Name | Output |
| ------------- | --------------------------------------------------- |
| log |
|
| info |
|
| lame |
|
| success |
|
| warn |
|
| error |
|
| evil |
|
| enable | Sets logger to enabled |
| disable | Sets logger to disabled (won't print anything) |
| toggleEnabled | Toggles loggers enabled variable |
| setEnabled | Sets loggers enabled variable |
