@shasharoman/log

1.1.0 • Public • Published

LOG

LOG is logger with simplest features.

Examples

file log

const log = require('log');

let logger = new log.Logger('label', [
    new log.ConsoleTransport('DEBUG'),
    new log.FileTransport('INFO', './log')
]);

logger.debug('debug');
logger.info('info');
logger.warn('wran');
logger.error('error');

./log file's content:

2019-10-05 23:00:00 [INFO] [label] info
2019-10-05 23:00:00 [WARN] [label] wran
2019-10-05 23:00:00 [ERROR] [label] error

Readme

Keywords

Package Sidebar

Install

npm i @shasharoman/log

Weekly Downloads

16

Version

1.1.0

License

MIT

Unpacked Size

8.21 kB

Total Files

6

Last publish

Collaborators

  • shasharoman