mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
deps: proc-log@4.0.0 (#3022)
This commit is contained in:
parent
b22d5eef86
commit
141aa6bf02
2 changed files with 6 additions and 7 deletions
11
lib/log.js
11
lib/log.js
|
@ -1,12 +1,11 @@
|
|||
'use strict'
|
||||
|
||||
const procLog = require('proc-log')
|
||||
const { log } = require('proc-log')
|
||||
const { format } = require('util')
|
||||
|
||||
// helper to emit log messages with a predefined prefix
|
||||
const logLevels = Object.keys(procLog).filter((k) => typeof procLog[k] === 'function')
|
||||
const withPrefix = (prefix) => logLevels.reduce((acc, level) => {
|
||||
acc[level] = (...args) => procLog[level](prefix, ...args)
|
||||
const withPrefix = (prefix) => log.LEVELS.reduce((acc, level) => {
|
||||
acc[level] = (...args) => log[level](prefix, ...args)
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
|
@ -78,7 +77,7 @@ class Logger {
|
|||
this.#levels = new Map(this.#levels.map((level, index) => [level.id, { ...level, index }]))
|
||||
this.level = 'info'
|
||||
this.stream = stream
|
||||
procLog.pause()
|
||||
log.pause()
|
||||
}
|
||||
|
||||
get stream () {
|
||||
|
@ -165,5 +164,5 @@ module.exports = {
|
|||
logger: new Logger(NULL_LOGGER ? null : process.stderr),
|
||||
stdout: NULL_LOGGER ? () => {} : (...args) => console.log(...args),
|
||||
withPrefix,
|
||||
...procLog
|
||||
...log
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"graceful-fs": "^4.2.6",
|
||||
"make-fetch-happen": "^13.0.0",
|
||||
"nopt": "^7.0.0",
|
||||
"proc-log": "^3.0.0",
|
||||
"proc-log": "^4.1.0",
|
||||
"semver": "^7.3.5",
|
||||
"tar": "^6.2.1",
|
||||
"which": "^4.0.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue