Always show error log

This commit is contained in:
redphx 2024-12-10 20:51:00 +07:00
parent 61cfd3f8db
commit 597cc9782d

View File

@ -7,12 +7,12 @@ const enum TextColor {
}
export class BxLogger {
static info = (tag: string, ...args: any[]) => BxLogger.log(TextColor.INFO, tag, ...args);
static warning = (tag: string, ...args: any[]) => BxLogger.log(TextColor.WARNING, tag, ...args);
static info = (tag: string, ...args: any[]) => BX_FLAGS.Debug && BxLogger.log(TextColor.INFO, tag, ...args);
static warning = (tag: string, ...args: any[]) => BX_FLAGS.Debug && BxLogger.log(TextColor.WARNING, tag, ...args);
static error = (tag: string, ...args: any[]) => BxLogger.log(TextColor.ERROR, tag, ...args);
private static log(color: string, tag: string, ...args: any) {
BX_FLAGS.Debug && console.log(`%c[BxC]`, `color:${color};font-weight:bold;`, tag, '//', ...args);
console.log(`%c[BxC]`, `color:${color};font-weight:bold;`, tag, '//', ...args);
}
}