summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/lib/util/proclog.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote/lib/util/proclog.js')
-rw-r--r--deps/npm/node_modules/pacote/lib/util/proclog.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/deps/npm/node_modules/pacote/lib/util/proclog.js b/deps/npm/node_modules/pacote/lib/util/proclog.js
new file mode 100644
index 0000000000..e4a2bf8acf
--- /dev/null
+++ b/deps/npm/node_modules/pacote/lib/util/proclog.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const LEVELS = [
+ 'notice',
+ 'error',
+ 'warn',
+ 'info',
+ 'verbose',
+ 'http',
+ 'silly',
+ 'pause',
+ 'resume'
+]
+
+const logger = {}
+for (const level of LEVELS) {
+ logger[level] = log(level)
+}
+module.exports = logger
+
+function log (level) {
+ return (category, ...args) => process.emit('log', level, category, ...args)
+}