Skip to content

Latest commit

 

History

History
executable file
·
56 lines (43 loc) · 1.46 KB

README.md

File metadata and controls

executable file
·
56 lines (43 loc) · 1.46 KB

gowento-logger

Gowento Logger

NPM version Build Status Coveralls Status Dependency Status Downloads

Install

# Using npm
npm install gowento-logger
# Using yarn
yarn add gowento-logger

Usage

import logger from 'gowento-logger';

logger.info('message', { data: [{ foo: 1 }, { bar: 2 }] });
logger.warn('warn message');
logger.error(new Error('Foo'));
logger.debug('should be hidden');

const logger2 = logger.clone({
  level: 'debug',
  color: false,
  readable: false,
  prefix: 'foo.',
});

logger2.debug('should be visible');
logger2.warn('no color', { foo: 'bar' });

License

MIT © Gowento