LOG is logger with simplest features.
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