Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/proc-log-listener.js')
-rw-r--r--lib/utils/proc-log-listener.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/utils/proc-log-listener.js b/lib/utils/proc-log-listener.js
deleted file mode 100644
index 2cfe94ecb..000000000
--- a/lib/utils/proc-log-listener.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const log = require('npmlog')
-const { inspect } = require('util')
-module.exports = () => {
- process.on('log', (level, ...args) => {
- try {
- log[level](...args)
- } catch (ex) {
- try {
- // if it crashed once, it might again!
- log.verbose(`attempt to log ${inspect([level, ...args])} crashed`, ex)
- } catch (ex2) {
- console.error(`attempt to log ${inspect([level, ...args])} crashed`, ex)
- }
- }
- })
-}
-
-// for tests
-/* istanbul ignore next */
-module.exports.reset = () => {
- process.removeAllListeners('log')
-}