We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03f5b49 commit c8cab82Copy full SHA for c8cab82
1 file changed
src/apps/logger.ts
@@ -33,15 +33,16 @@ const ANSI_COLOR_MAP: Record<number, string> = {
33
34
// 日志行匹配相关常量
35
const LOG_TIME_PREFIX_REGEX = /^\[\d{2}:\d{2}:\d{2}\.\d{3}\]/
36
-const LOG_HEADER_REGEX = /^(\[\d{2}:\d{2}:\d{2}\.\d{3}\])(\[(?:INFO|WARN|ERROR|ERRO|FATAL|DEBUG|TRACE|MARK)\])/
+const LOG_HEADER_REGEX = /^(\[\d{2}:\d{2}:\d{2}\.\d{3}\])(\[(?:INFO|WARN|ERROR|ERRO|FATAL|DEBUG|DEBU|TRACE|MARK)\])/
37
38
const LOG_LEVEL_COLOR_CODE: Record<string, string> = {
39
INFO: '\x1b[32m', // 绿色
40
WARN: '\x1b[33m', // 黄色
41
ERROR: '\x1b[31m', // 红色
42
ERRO: '\x1b[31m', // 兼容旧字段
43
FATAL: '\x1b[35m', // 紫色
44
- DEBUG: '\x1b[90m', // 灰色
+ DEBUG: '\x1b[94m', // 淡蓝色
45
+ DEBU: '\x1b[94m', // 淡蓝色(部分日志中使用 [DEBU] 缩写)
46
TRACE: '\x1b[90m', // 灰色
47
MARK: '\x1b[90m', // 灰色
48
}
0 commit comments