mirror of
https://github.com/develop202/migu_video.git
synced 2025-12-17 15:25:03 +08:00
更新
This commit is contained in:
@@ -1,26 +1,31 @@
|
||||
import { getLogDateTime } from "./time.js"
|
||||
|
||||
function basePrint(color, msg) {
|
||||
console.log(`${color}%s %s\x1B[0m`, `[${getLogDateTime(new Date())}]`, msg)
|
||||
}
|
||||
|
||||
function printRed(msg) {
|
||||
console.log('\x1B[31m%s\x1B[0m', msg)
|
||||
basePrint("\x1B[31m", msg)
|
||||
}
|
||||
|
||||
function printGreen(msg) {
|
||||
console.log('\x1B[32m%s\x1B[0m', msg)
|
||||
basePrint("\x1B[32m", msg)
|
||||
}
|
||||
|
||||
function printYellow(msg) {
|
||||
console.log('\x1B[33m%s\x1B[0m', msg)
|
||||
basePrint("\x1B[33m", msg)
|
||||
}
|
||||
|
||||
function printBlue(msg) {
|
||||
console.log('\x1B[34m%s\x1B[0m', msg)
|
||||
basePrint("\x1B[33m", msg)
|
||||
}
|
||||
|
||||
function printMagenta(msg) {
|
||||
console.log('\x1B[35m%s\x1B[0m', msg)
|
||||
basePrint("\x1B[35m", msg)
|
||||
}
|
||||
|
||||
function printGrey(msg) {
|
||||
console.log('\x1B[2m%s\x1B[0m', msg)
|
||||
basePrint("\x1B[2m", msg)
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user