1.0.0 • Published 5 months ago

@elinzy/e-logger v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@elinzy/e-logger

Install

npm install @elinzy/e-logger

Usage

import * as L from '@elinzy/e-logger'; // or, use '@elinzy/e-logger/compact' to replace

// compact
L.info('Item-1');
L.success('Item-1');
L.error('Item-1');
L.warn('Item-1');

// complex - suppurt `options` parameter
L.info({ timestamp: true }, 'Item-1');
L.success({ fit: true }, 'Item-1');
L.error({ chip: true, text: 'ERROR' }, 'Item-1');
L.warn({ fit: true, chip: true, text: 'WARNING' }, 'Item-1');

API

info(strings?, ...slots)

strings

  • Type: String|Object
  • Default:

slots

  • Type: Array[]
  • Default:

success(strings?, ...slots)

error(strings?, ...slots)

warn(strings?, ...slots)

License

MIT

Related

1.0.0

5 months ago

0.2.1

5 months ago

0.2.0

7 months ago

0.1.0

7 months ago