mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
cli: 更改颜色
This commit is contained in:
parent
79c550db14
commit
4e377f1c41
@ -127,20 +127,20 @@ const Base = {
|
||||
debug(context, msg) {
|
||||
if (this.level > 3) {
|
||||
if (msg instanceof Object) msg = JSON.stringify(msg, null, 4);
|
||||
this.proPrint([`[${Date()}]`, chalk.grey("[Debug]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#0070BB')(`[\n${msg}\n]`)])
|
||||
this.proPrint([chalk.hex('#64B3FF')(`[${Date()}]`), chalk.grey("[Debug]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#0070BB')(`[\n${msg}\n]`)])
|
||||
}
|
||||
},
|
||||
info(context, msg) {
|
||||
if (this.level > 2)
|
||||
this.proPrint([`[${Date()}]`, chalk.grey("[Info]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#48BB31')(`[${msg}]`)])
|
||||
this.proPrint([chalk.hex('#64B3FF')(`[${Date()}]`), chalk.grey("[Info]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#48BB31')(`[${msg}]`)])
|
||||
},
|
||||
warn(context, msg) {
|
||||
if (this.level > 1)
|
||||
this.proPrint([`[${Date()}]`, chalk.grey("[Warn]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#BBBB23')(`[${msg}]`)])
|
||||
this.proPrint([chalk.hex('#64B3FF')(`[${Date()}]`), chalk.grey("[Warn]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#BBBB23')(`[${msg}]`)])
|
||||
},
|
||||
error(context, msg) {
|
||||
if (this.level > 0)
|
||||
this.proPrint([`[${Date()}]`, chalk.grey("[Error]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#FF0006')(`[${msg}]`)])
|
||||
this.proPrint([chalk.hex('#64B3FF')(`[${Date()}]`), chalk.grey("[Error]"), chalk.hex('#FFA500')(`[${context}]`), chalk.hex('#FF0006')(`[${msg}]`)])
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user