diff options
Diffstat (limited to 'node_modules/proc-log/index.js')
-rw-r--r-- | node_modules/proc-log/index.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/node_modules/proc-log/index.js b/node_modules/proc-log/index.js new file mode 100644 index 000000000..9b58713ff --- /dev/null +++ b/node_modules/proc-log/index.js @@ -0,0 +1,22 @@ +// emits 'log' events on the process +const LEVELS = [ + 'notice', + 'error', + 'warn', + 'info', + 'verbose', + 'http', + 'silly', + 'pause', + 'resume', +] + +const log = level => (...args) => process.emit('log', level, ...args) + +const logger = {} +for (const level of LEVELS) + logger[level] = log(level) + +logger.LEVELS = LEVELS + +module.exports = logger |