source: trip-planner-front/node_modules/pacote/lib/util/proc-log.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 349 bytes
RevLine 
[6a3a178]1// default logger.
2// emits 'log' events on the process
3const LEVELS = [
4 'notice',
5 'error',
6 'warn',
7 'info',
8 'verbose',
9 'http',
10 'silly',
11 'pause',
12 'resume'
13]
14
15const log = level => (...args) => process.emit('log', level, ...args)
16
17const logger = {}
18for (const level of LEVELS) {
19 logger[level] = log(level)
20}
21module.exports = logger
Note: See TracBrowser for help on using the repository browser.