@amphibian/logger

pretty, extendable logs

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
Minified + gzip package size for @amphibian/logger in KB

Readme

logger

build status

pretty, extendable logs

npm install @amphibian/logger
var chalk = require('chalk');
var {createLogger, timeLogger} = require('@amphibian/logger');

timeLogger.log('hello'); // > [2017-04-29T11:15:32.596Z] › hello

// Create your own logs
var logger = createLogger(() => (
    chalk.grey('[my-project]')
));

logger.log('Something!'); // > [my-project] › Something!

// Extend logs
var helloLogger = timeLogger.extend('hello');
helloLogger.log('you!'); // > [2017-04-29T11:15:32.596Z] hello › you

// Disable/enable logs
helloLogger.disable();
helloLogger.log('something'); // (nothing)
helloLogger.extend('you').log('there'); // (nothing)
helloLogger.enable();
helloLogger.log('hello!');

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.