mirror of
https://github.com/JonasunderscoreJones/aka-worker.git
synced 2025-10-23 09:59:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
parent
8cb86120f1
commit
fff961078a
1777 changed files with 1011798 additions and 0 deletions
33
cool-dawn-3d3b/node_modules/prebuild-install/log.js
generated
vendored
Normal file
33
cool-dawn-3d3b/node_modules/prebuild-install/log.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
const levels = {
|
||||
silent: 0,
|
||||
error: 1,
|
||||
warn: 2,
|
||||
notice: 3,
|
||||
http: 4,
|
||||
timing: 5,
|
||||
info: 6,
|
||||
verbose: 7,
|
||||
silly: 8
|
||||
}
|
||||
|
||||
module.exports = function (rc, env) {
|
||||
const level = rc.verbose
|
||||
? 'verbose'
|
||||
: env.npm_config_loglevel || 'notice'
|
||||
|
||||
const logAtLevel = function (messageLevel) {
|
||||
return function (...args) {
|
||||
if (levels[messageLevel] <= levels[level]) {
|
||||
console.error(`prebuild-install ${messageLevel} ${args.join(' ')}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
error: logAtLevel('error'),
|
||||
warn: logAtLevel('warn'),
|
||||
http: logAtLevel('http'),
|
||||
info: logAtLevel('info'),
|
||||
level
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue