Logging ![Build Status](https://camo.githubusercontent.com/52dcda7d0317674b9d8a50ca943ddab9469b549a0d4687198e599f2a0022a167/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f64796c616e672f6c6f6767696e672e737667)
Lightweight informative modern console logging.
Install
yarn add logging
Features
- Simple.
- Log levels.
- Nice coloring.
Usage
// or const createLogger = require('logging');
import createLogger from 'logging';
const logger = createLogger('FeatureName');
logger.info('Interesting');
// -> [ Feature ] Interesting
logger.warn('Hmmm...', { details });
// -> [ WARNING Feature ] Hmmm... { details object }
logger.error('Not good.', 'Not good at all.', { err }, { context }, { etc });
// -> [ ERROR Feature ] Not good. Not good at all. { err } { context } ...
// uses the debug module, use DEBUG=* or DEBUG=FeatureName to see these items.
logger.debug('Interesting');
// -> [ Feature ] Interesting