mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-26 09:42:18 +00:00
17 lines
372 B
JavaScript
17 lines
372 B
JavaScript
|
const debug = {
|
||
|
log: async (...args) => {
|
||
|
const cfg = await getCfg()
|
||
|
|
||
|
if (cfg.debug) console.log('[DEBUG] ', ...args)
|
||
|
},
|
||
|
warn: async (...args) => {
|
||
|
const cfg = await getCfg()
|
||
|
|
||
|
if (cfg.debug) console.log('[WARNING] ', ...args)
|
||
|
},
|
||
|
error: async (...args) => {
|
||
|
const cfg = await getCfg()
|
||
|
|
||
|
if (cfg.debug) console.log('[ERROR] ', ...args)
|
||
|
}
|
||
|
}
|