@digitalronin/logger
A simple wrapper for console.log
for Node or browser. The former supports colors, using chalk
Link
Installation
> yarn add @digitalronin/logger --dev
> npm install @digitalronin/logger -D
Usage
Browser
const Logger = require('@digitalronin/logger');
const l = new Logger();
l.log('Test log');
l.error('Test error');
l.info('Test info');
Node
const Logger = require('@digitalronin/logger');
const l = new Logger();
l.log('Test log');
l.error('Test error');
l.info('Test info');
Overwriting default colors
Only the following colors is supported
const Logger = require('@digitalronin/logger');
const l = new Logger({
error: 'blue',
info: 'white',
log: 'green',
});