@blocklet/logger

1.16.26 • Public • Published

Blocklet logger

A library to facilitate Blocklet logging.

Usage

const logger = require('@blocklet/logger');

// log
log = logger('demo');
log.info('this is demo', { id: 'test-id' });
log.warn('this is demo', { id: 'test-id' });
log.error('this is demo', { id: 'test-id' });
log.debug('this is demo', { id: 'test-id' });

// access log
app.use(morgan('combined', { stream: logger.getAccessLogStream() }));

Readme

Keywords

Package Sidebar

Install

npm i @blocklet/logger

Weekly Downloads

474

Version

1.16.26

License

Apache-2.0

Unpacked Size

2.45 kB

Total Files

4

Last publish

Collaborators

  • wangshijun
  • gxw