Skip to content

gowento/gowento-logger

Repository files navigation

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