front-cpu 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/logging/CPUConsole.d.ts +14 -0
- package/dist/logging/CPUConsole.d.ts.map +1 -1
- package/dist/logging/CPUConsole.js +96 -52
- package/dist/logging/CPUConsole.js.map +1 -1
- package/dist/logging/console-i18n.d.ts +5 -0
- package/dist/logging/console-i18n.d.ts.map +1 -0
- package/dist/logging/console-i18n.js +105 -0
- package/dist/logging/console-i18n.js.map +1 -0
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/index.d.ts.map +1 -1
- package/dist/logging/index.js +1 -0
- package/dist/logging/index.js.map +1 -1
- package/package.json +1 -1
- package/src/logging/CPUConsole.ts +109 -52
- package/src/logging/console-i18n.ts +160 -0
- package/src/logging/index.ts +2 -0
|
@@ -9,15 +9,29 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { QueuedInstruction } from '../types';
|
|
11
11
|
import { ConsoleLevel } from './types';
|
|
12
|
+
import { type CPUConsoleLocale, type CPUConsoleTranslate } from './console-i18n';
|
|
12
13
|
export declare class CPUConsole {
|
|
13
14
|
private enabled;
|
|
14
15
|
private level;
|
|
15
16
|
private filter;
|
|
17
|
+
private locale;
|
|
18
|
+
private translator;
|
|
16
19
|
constructor();
|
|
20
|
+
/**
|
|
21
|
+
* 设置语言(en / zh-CN / bilingual)
|
|
22
|
+
*/
|
|
23
|
+
setLocale(locale: CPUConsoleLocale): void;
|
|
24
|
+
/**
|
|
25
|
+
* 自定义翻译函数(不依赖任何 i18n 框架)
|
|
26
|
+
*/
|
|
27
|
+
setI18nTranslator(t: CPUConsoleTranslate): void;
|
|
28
|
+
getLocale(): CPUConsoleLocale;
|
|
17
29
|
/**
|
|
18
30
|
* 加载设置
|
|
19
31
|
*/
|
|
20
32
|
private loadSettings;
|
|
33
|
+
private t;
|
|
34
|
+
private getDefaultLocale;
|
|
21
35
|
/**
|
|
22
36
|
* 配置方法
|
|
23
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CPUConsole.d.ts","sourceRoot":"","sources":["../../src/logging/CPUConsole.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"CPUConsole.d.ts","sourceRoot":"","sources":["../../src/logging/CPUConsole.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAA;AAEvB,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,KAAK,CAAoC;IACjD,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,MAAM,CAA4C;IAC1D,OAAO,CAAC,UAAU,CAA+D;;IAMjF;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAMzC;;OAEG;IACH,iBAAiB,CAAC,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAI/C,SAAS,IAAI,gBAAgB;IAI7B;;OAEG;IACH,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,CAAC;IAIT,OAAO,CAAC,gBAAgB;IASxB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAKnC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAKhC,MAAM,IAAI,IAAI;IAId,OAAO,IAAI,IAAI;IAIf,QAAQ,IAAI,YAAY;IAMxB;;OAEG;IACH,oBAAoB,CAAC,WAAW,EAAE,iBAAiB,GA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C,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CA0BhG;AAGD,eAAO,MAAM,UAAU,YAAmB,CAAA;AAG1C,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -9,13 +9,33 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { ConsoleLevel } from './types';
|
|
11
11
|
import { formatCallSourceShort } from './stack-parser';
|
|
12
|
+
import { createCPUConsoleTranslator, } from './console-i18n';
|
|
12
13
|
export class CPUConsole {
|
|
13
14
|
constructor() {
|
|
14
15
|
this.enabled = true;
|
|
15
16
|
this.level = ConsoleLevel.NORMAL;
|
|
16
17
|
this.filter = new Set(); // 指令类型过滤
|
|
18
|
+
this.locale = this.getDefaultLocale();
|
|
19
|
+
this.translator = createCPUConsoleTranslator(this.locale);
|
|
17
20
|
this.loadSettings();
|
|
18
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* 设置语言(en / zh-CN / bilingual)
|
|
24
|
+
*/
|
|
25
|
+
setLocale(locale) {
|
|
26
|
+
this.locale = locale;
|
|
27
|
+
this.translator = createCPUConsoleTranslator(locale);
|
|
28
|
+
localStorage.setItem('cpu-console-locale', locale);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 自定义翻译函数(不依赖任何 i18n 框架)
|
|
32
|
+
*/
|
|
33
|
+
setI18nTranslator(t) {
|
|
34
|
+
this.translator = t;
|
|
35
|
+
}
|
|
36
|
+
getLocale() {
|
|
37
|
+
return this.locale;
|
|
38
|
+
}
|
|
19
39
|
/**
|
|
20
40
|
* 加载设置
|
|
21
41
|
*/
|
|
@@ -34,6 +54,23 @@ export class CPUConsole {
|
|
|
34
54
|
// 忽略解析错误
|
|
35
55
|
}
|
|
36
56
|
}
|
|
57
|
+
const savedLocale = localStorage.getItem('cpu-console-locale');
|
|
58
|
+
if (savedLocale === 'en' || savedLocale === 'zh-CN' || savedLocale === 'bilingual') {
|
|
59
|
+
this.locale = savedLocale;
|
|
60
|
+
this.translator = createCPUConsoleTranslator(savedLocale);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
t(key, params) {
|
|
64
|
+
return this.translator(key, params);
|
|
65
|
+
}
|
|
66
|
+
getDefaultLocale() {
|
|
67
|
+
// 默认策略:中文环境输出双语,否则英文
|
|
68
|
+
if (typeof navigator !== 'undefined') {
|
|
69
|
+
const lang = navigator.language || '';
|
|
70
|
+
if (lang.toLowerCase().startsWith('zh'))
|
|
71
|
+
return 'bilingual';
|
|
72
|
+
}
|
|
73
|
+
return 'en';
|
|
37
74
|
}
|
|
38
75
|
/**
|
|
39
76
|
* 配置方法
|
|
@@ -68,9 +105,9 @@ export class CPUConsole {
|
|
|
68
105
|
? ` %c📍 ${formatCallSourceShort(instruction.context.callSource)}`
|
|
69
106
|
: '';
|
|
70
107
|
// 🎯 使用与指令成功一致的分组格式
|
|
71
|
-
console.groupCollapsed(`%c[
|
|
108
|
+
console.groupCollapsed(`%c[${this.t('instruction.created')}] %c${this.formatTime()} %c${instruction.type}%c${callSourceInfo}`, 'color: #3b82f6; font-weight: bold', 'color: #666; font-size: 11px', 'color: #3b82f6; font-weight: bold; background: #3b82f615; padding: 2px 6px; border-radius: 3px', 'color: #3b82f6', ...(callSourceInfo ? ['color: #8b5cf6; font-weight: bold'] : []));
|
|
72
109
|
// 🔥 显示指令基本信息
|
|
73
|
-
console.log(
|
|
110
|
+
console.log(`%c📋 ${this.t('label.instructionInfo')}`, 'color: #3b82f6; font-weight: bold');
|
|
74
111
|
console.table({
|
|
75
112
|
'Instruction ID': instruction.id,
|
|
76
113
|
'Correlation ID': instruction.context.correlationId,
|
|
@@ -81,15 +118,15 @@ export class CPUConsole {
|
|
|
81
118
|
});
|
|
82
119
|
// 🔥 显示指令参数
|
|
83
120
|
if (this.level >= ConsoleLevel.DEBUG) {
|
|
84
|
-
console.log(
|
|
121
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold');
|
|
85
122
|
console.log(instruction.payload);
|
|
86
123
|
}
|
|
87
124
|
else {
|
|
88
|
-
console.log(
|
|
125
|
+
console.log(`%c📝 ${this.t('label.payloadDebugOnly')}`, 'color: #666; font-style: italic');
|
|
89
126
|
}
|
|
90
127
|
// 🔥 显示调用源详情
|
|
91
128
|
if (instruction.context.callSource && this.level >= ConsoleLevel.VERBOSE) {
|
|
92
|
-
console.log(
|
|
129
|
+
console.log(`%c📍 ${this.t('label.callSourceDetails')}`, 'color: #8b5cf6; font-weight: bold');
|
|
93
130
|
console.table({
|
|
94
131
|
'File': instruction.context.callSource.file,
|
|
95
132
|
'Line': instruction.context.callSource.line,
|
|
@@ -111,48 +148,48 @@ export class CPUConsole {
|
|
|
111
148
|
? ` %c📍 ${formatCallSourceShort(instruction.context.callSource)}`
|
|
112
149
|
: '';
|
|
113
150
|
// 🎯 核心:折叠分组,方便查看
|
|
114
|
-
console.groupCollapsed(`%c[
|
|
151
|
+
console.groupCollapsed(`%c[${this.t('instruction.success')}] %c${this.formatTime()} %c${instruction.type}%c %c${duration}ms${callSourceInfo}`, 'color: #10b981; font-weight: bold', 'color: #666; font-size: 11px', 'color: #10b981; font-weight: bold; background: #10b98115; padding: 2px 6px; border-radius: 3px', 'color: #10b981', 'color: #10b981; font-weight: bold', ...(callSourceInfo ? ['color: #8b5cf6; font-weight: bold'] : []));
|
|
115
152
|
// 🔥 显示指令输入参数
|
|
116
153
|
if (this.level >= ConsoleLevel.NORMAL) {
|
|
117
|
-
console.log(
|
|
154
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold');
|
|
118
155
|
console.log(instruction.payload);
|
|
119
156
|
}
|
|
120
157
|
// 🔥 显示后端返回结果
|
|
121
158
|
if (instruction.result && this.level >= ConsoleLevel.NORMAL) {
|
|
122
|
-
console.log(
|
|
159
|
+
console.log(`%c📥 ${this.t('label.backendResult')}`, 'color: #10b981; font-weight: bold');
|
|
123
160
|
console.log(instruction.result);
|
|
124
161
|
}
|
|
125
162
|
// 🔥 显示WB阶段真实执行内容
|
|
126
163
|
if (this.level >= ConsoleLevel.VERBOSE && instruction.writeBackExecution) {
|
|
127
164
|
const wbExec = instruction.writeBackExecution;
|
|
128
|
-
console.log(
|
|
165
|
+
console.log(`%c💾 ${this.t('label.wbExecution')}`, 'color: #8b5cf6; font-weight: bold');
|
|
129
166
|
if (wbExec.hasCommit) {
|
|
130
167
|
if (wbExec.commitSuccess === true) {
|
|
131
|
-
console.log(
|
|
132
|
-
console.log(
|
|
168
|
+
console.log(` ${this.t('wb.commitOk')}`);
|
|
169
|
+
console.log(` ${this.t('wb.commitArgs')}`, wbExec.commitArgs);
|
|
133
170
|
}
|
|
134
171
|
else if (wbExec.commitSuccess === false) {
|
|
135
|
-
console.log(
|
|
136
|
-
console.log(
|
|
137
|
-
console.log(
|
|
172
|
+
console.log(` ${this.t('wb.commitFail')}`);
|
|
173
|
+
console.log(` ${this.t('wb.commitArgs')}`, wbExec.commitArgs);
|
|
174
|
+
console.log(` ${this.t('wb.commitError')}`, wbExec.commitError);
|
|
138
175
|
}
|
|
139
176
|
else {
|
|
140
|
-
console.log(
|
|
177
|
+
console.log(` ${this.t('wb.commitUnknown')}`);
|
|
141
178
|
}
|
|
142
179
|
}
|
|
143
180
|
else {
|
|
144
|
-
console.log(
|
|
181
|
+
console.log(` ${this.t('wb.noCommit')}`);
|
|
145
182
|
}
|
|
146
183
|
if (wbExec.rollbackExecuted) {
|
|
147
|
-
console.log(
|
|
148
|
-
console.log(
|
|
184
|
+
console.log(` ${this.t('wb.rollbackExecuted')}`);
|
|
185
|
+
console.log(` ${this.t('wb.rollbackSnapshot')}`, wbExec.rollbackSnapshot);
|
|
149
186
|
if (wbExec.rollbackError) {
|
|
150
|
-
console.log(
|
|
187
|
+
console.log(` ${this.t('wb.rollbackError')}`, wbExec.rollbackError);
|
|
151
188
|
}
|
|
152
189
|
}
|
|
153
190
|
// 显示中断处理器注册(成功时)
|
|
154
191
|
if (instruction.status === 'committed') {
|
|
155
|
-
console.log(
|
|
192
|
+
console.log(` ${this.t('wb.interruptRegistered')}`);
|
|
156
193
|
}
|
|
157
194
|
}
|
|
158
195
|
// 显示流水线阶段
|
|
@@ -176,16 +213,16 @@ export class CPUConsole {
|
|
|
176
213
|
? ` %c📍 ${formatCallSourceShort(instruction.context.callSource)}`
|
|
177
214
|
: '';
|
|
178
215
|
// 使用橙色表示取消(不同于红色的失败)
|
|
179
|
-
console.groupCollapsed(`%c[
|
|
216
|
+
console.groupCollapsed(`%c[${this.t('instruction.cancelled')}] %c${this.formatTime()} %c${instruction.type}%c %c${duration}ms${callSourceInfo}`, 'color: #f59e0b; font-weight: bold', 'color: #666; font-size: 11px', 'color: #f59e0b; font-weight: bold; background: #f59e0b15; padding: 2px 6px; border-radius: 3px', 'color: #f59e0b', 'color: #f59e0b; font-weight: bold', ...(callSourceInfo ? ['color: #8b5cf6; font-weight: bold'] : []));
|
|
180
217
|
// 显示取消原因
|
|
181
|
-
console.warn(`%c
|
|
218
|
+
console.warn(`%c${this.t('label.reason')} ${instruction.cancelReason || this.t('common.unknownReason')}`, 'color: #f59e0b; font-weight: bold');
|
|
182
219
|
// 显示取消阶段
|
|
183
220
|
if (instruction.cancelledAt) {
|
|
184
|
-
console.log(`%c🔸
|
|
221
|
+
console.log(`%c🔸 ${this.t('label.cancelStage')} ${instruction.cancelledAt}`, 'color: #f59e0b');
|
|
185
222
|
}
|
|
186
223
|
// 🔥 显示指令输入参数
|
|
187
224
|
if (this.level >= ConsoleLevel.NORMAL) {
|
|
188
|
-
console.log(
|
|
225
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold');
|
|
189
226
|
console.log(instruction.payload);
|
|
190
227
|
}
|
|
191
228
|
// 显示流水线阶段
|
|
@@ -205,17 +242,17 @@ export class CPUConsole {
|
|
|
205
242
|
? ` %c📍 ${formatCallSourceShort(instruction.context.callSource)}`
|
|
206
243
|
: '';
|
|
207
244
|
// 🔥 失败时自动展开,方便排查
|
|
208
|
-
console.group(`%c[
|
|
245
|
+
console.group(`%c[${this.t('instruction.failed')}] %c${this.formatTime()} %c${instruction.type}%c %c${duration}ms${callSourceInfo}`, 'color: #ef4444; font-weight: bold', 'color: #666; font-size: 11px', 'color: #ef4444; font-weight: bold; background: #ef444415; padding: 2px 6px; border-radius: 3px', 'color: #ef4444', 'color: #ef4444; font-weight: bold', ...(callSourceInfo ? ['color: #8b5cf6; font-weight: bold'] : []));
|
|
209
246
|
// 显示错误信息
|
|
210
|
-
console.error(`%c
|
|
247
|
+
console.error(`%c${this.t('label.reason')} ${error.message}`, 'color: #ef4444; font-weight: bold');
|
|
211
248
|
// 🔥 显示指令输入参数
|
|
212
249
|
if (this.level >= ConsoleLevel.NORMAL) {
|
|
213
|
-
console.log(
|
|
250
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold');
|
|
214
251
|
console.log(instruction.payload);
|
|
215
252
|
}
|
|
216
253
|
// 显示是否回滚
|
|
217
254
|
if (instruction.optimisticSnapshot) {
|
|
218
|
-
console.log(
|
|
255
|
+
console.log(`%c🔄 ${this.t('optimistic.rolledBack')}`, 'color: #f59e0b; font-weight: bold');
|
|
219
256
|
}
|
|
220
257
|
// 显示流水线阶段
|
|
221
258
|
if (this.level >= ConsoleLevel.VERBOSE) {
|
|
@@ -241,15 +278,15 @@ export class CPUConsole {
|
|
|
241
278
|
const callSourceInfo = instruction.context.callSource
|
|
242
279
|
? ` %c📍 ${formatCallSourceShort(instruction.context.callSource)}`
|
|
243
280
|
: '';
|
|
244
|
-
console.groupCollapsed(`%c[
|
|
281
|
+
console.groupCollapsed(`%c[${this.t('optimistic.applied')}] %c${this.formatTime()} %c${instruction.type}%c${callSourceInfo}`, 'color: #8b5cf6; font-weight: bold', 'color: #666; font-size: 11px', 'color: #8b5cf6; font-weight: bold; background: #8b5cf615; padding: 2px 6px; border-radius: 3px', 'color: #8b5cf6', ...(callSourceInfo ? ['color: #8b5cf6; font-weight: bold'] : []));
|
|
245
282
|
// 显示乐观更新的 payload
|
|
246
283
|
if (this.level >= ConsoleLevel.DEBUG) {
|
|
247
|
-
console.log(
|
|
284
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #8b5cf6; font-weight: bold');
|
|
248
285
|
console.log(instruction.payload);
|
|
249
286
|
}
|
|
250
287
|
// 显示快照信息
|
|
251
288
|
if (instruction.optimisticSnapshot) {
|
|
252
|
-
console.log(
|
|
289
|
+
console.log(`%c💾 ${this.t('label.snapshotSaved')}`, 'color: #10b981; font-size: 11px');
|
|
253
290
|
}
|
|
254
291
|
console.groupEnd();
|
|
255
292
|
}
|
|
@@ -267,12 +304,12 @@ export class CPUConsole {
|
|
|
267
304
|
? ` %c📍 ${formatCallSourceShort(instruction.context.callSource)}`
|
|
268
305
|
: '';
|
|
269
306
|
// 🔥 回滚重要,使用展开分组便于立即查看
|
|
270
|
-
console.group(`%c[
|
|
307
|
+
console.group(`%c[${this.t('optimistic.rolledBack')}] %c${this.formatTime()} %c${instruction.type}%c${callSourceInfo}`, 'color: #f59e0b; font-weight: bold', 'color: #666; font-size: 11px', 'color: #f59e0b; font-weight: bold; background: #f59e0b15; padding: 2px 6px; border-radius: 3px', 'color: #f59e0b', ...(callSourceInfo ? ['color: #8b5cf6; font-weight: bold'] : []));
|
|
271
308
|
// 显示回滚原因
|
|
272
|
-
console.log(
|
|
309
|
+
console.log(`%c⚠️ ${this.t('label.rollbackReason')}`, 'color: #f59e0b; font-weight: bold');
|
|
273
310
|
console.log(reason);
|
|
274
311
|
// 显示指令信息
|
|
275
|
-
console.log(
|
|
312
|
+
console.log(`%c📋 ${this.t('label.instructionInfo')}`, 'color: #f59e0b; font-weight: bold');
|
|
276
313
|
console.table({
|
|
277
314
|
'Instruction ID': instruction.id,
|
|
278
315
|
'Correlation ID': instruction.context.correlationId,
|
|
@@ -288,7 +325,7 @@ export class CPUConsole {
|
|
|
288
325
|
if (!this.shouldPrint(instruction.type))
|
|
289
326
|
return;
|
|
290
327
|
if (this.level >= ConsoleLevel.VERBOSE) {
|
|
291
|
-
console.log(`%c ⏳ ${this.formatTime()}
|
|
328
|
+
console.log(`%c ⏳ ${this.formatTime()} ${this.t('scheduler.conflictWait', { waitTime })}`, 'color: #f59e0b', {
|
|
292
329
|
instructionId: instruction.id,
|
|
293
330
|
conflictingWith,
|
|
294
331
|
});
|
|
@@ -326,7 +363,7 @@ export class CPUConsole {
|
|
|
326
363
|
*/
|
|
327
364
|
printPipelineStages(instruction) {
|
|
328
365
|
const timestamps = instruction.timestamps;
|
|
329
|
-
console.log(
|
|
366
|
+
console.log(`%c${this.t('label.pipelineStages')}`, 'color: #666; font-weight: bold');
|
|
330
367
|
// 打印各阶段之间的耗时
|
|
331
368
|
const transitions = [];
|
|
332
369
|
if (timestamps.IF && timestamps.SCH) {
|
|
@@ -345,18 +382,18 @@ export class CPUConsole {
|
|
|
345
382
|
// 打印总耗时
|
|
346
383
|
if (timestamps.IF && timestamps.WB) {
|
|
347
384
|
const total = timestamps.WB - timestamps.IF;
|
|
348
|
-
console.log(` %c
|
|
385
|
+
console.log(` %c${this.t('label.totalDuration')} %c${total}ms`, 'color: #666; font-weight: bold', 'color: #10b981; font-weight: bold; font-size: 14px');
|
|
349
386
|
}
|
|
350
387
|
// 特殊标记
|
|
351
388
|
if (instruction.optimisticSnapshot) {
|
|
352
|
-
console.log(
|
|
389
|
+
console.log(` %c✓ ${this.t('label.optimisticUpdate')}`, 'color: #8b5cf6');
|
|
353
390
|
}
|
|
354
391
|
}
|
|
355
392
|
/**
|
|
356
393
|
* 打印指令详情
|
|
357
394
|
*/
|
|
358
395
|
printInstructionDetails(instruction) {
|
|
359
|
-
console.log(
|
|
396
|
+
console.log(`%c${this.t('label.details')}`, 'color: #666; font-weight: bold');
|
|
360
397
|
console.table({
|
|
361
398
|
'Instruction ID': instruction.id,
|
|
362
399
|
'Correlation ID': instruction.context.correlationId,
|
|
@@ -367,9 +404,9 @@ export class CPUConsole {
|
|
|
367
404
|
: 'N/A',
|
|
368
405
|
});
|
|
369
406
|
if (this.level >= ConsoleLevel.DEBUG) {
|
|
370
|
-
console.log('
|
|
407
|
+
console.log(`%c${this.t('label.payload')}`, 'color: #666; font-weight: bold', instruction.payload);
|
|
371
408
|
if (instruction.result) {
|
|
372
|
-
console.log('
|
|
409
|
+
console.log(`%c${this.t('label.backendResult')}`, 'color: #666; font-weight: bold', instruction.result);
|
|
373
410
|
}
|
|
374
411
|
}
|
|
375
412
|
}
|
|
@@ -380,23 +417,23 @@ export class CPUConsole {
|
|
|
380
417
|
const suggestions = [];
|
|
381
418
|
// 根据错误类型给出建议
|
|
382
419
|
if (error.message.includes('database is locked')) {
|
|
383
|
-
suggestions.push('
|
|
420
|
+
suggestions.push(this.t('suggest.dbLocked'));
|
|
384
421
|
}
|
|
385
422
|
if (error.message.includes('Network')) {
|
|
386
|
-
suggestions.push('
|
|
423
|
+
suggestions.push(this.t('suggest.network'));
|
|
387
424
|
}
|
|
388
425
|
if (error.message.includes('timeout')) {
|
|
389
|
-
suggestions.push('
|
|
426
|
+
suggestions.push(this.t('suggest.timeout'));
|
|
390
427
|
}
|
|
391
428
|
// 根据指令类型给出建议
|
|
392
429
|
const duration = instruction.timestamps.WB && instruction.timestamps.IF
|
|
393
430
|
? instruction.timestamps.WB - instruction.timestamps.IF
|
|
394
431
|
: 0;
|
|
395
432
|
if (duration > 1000) {
|
|
396
|
-
suggestions.push(
|
|
433
|
+
suggestions.push(this.t('suggest.slowInstruction', { duration }));
|
|
397
434
|
}
|
|
398
435
|
if (suggestions.length > 0) {
|
|
399
|
-
console.log(
|
|
436
|
+
console.log(`%c💡 ${this.t('label.suggestions')}`, 'color: #f59e0b; font-weight: bold');
|
|
400
437
|
suggestions.forEach((s) => {
|
|
401
438
|
console.log(` • ${s}`);
|
|
402
439
|
});
|
|
@@ -416,7 +453,14 @@ export class CPUConsole {
|
|
|
416
453
|
*/
|
|
417
454
|
formatTime() {
|
|
418
455
|
const now = new Date();
|
|
419
|
-
|
|
456
|
+
const timeLocale = this.locale === 'zh-CN'
|
|
457
|
+
? 'zh-CN'
|
|
458
|
+
: this.locale === 'en'
|
|
459
|
+
? 'en-GB'
|
|
460
|
+
: typeof navigator !== 'undefined' && (navigator.language || '').toLowerCase().startsWith('zh')
|
|
461
|
+
? 'zh-CN'
|
|
462
|
+
: 'en-GB';
|
|
463
|
+
return now.toLocaleTimeString(timeLocale, {
|
|
420
464
|
hour12: false,
|
|
421
465
|
hour: '2-digit',
|
|
422
466
|
minute: '2-digit',
|
|
@@ -456,11 +500,11 @@ export class CPUConsole {
|
|
|
456
500
|
printStats(stats) {
|
|
457
501
|
if (!this.enabled)
|
|
458
502
|
return;
|
|
459
|
-
console.group(
|
|
460
|
-
console.log(`
|
|
461
|
-
console.log(`
|
|
462
|
-
console.log(`
|
|
463
|
-
console.log(`
|
|
503
|
+
console.group(`%c📊 ${this.t('label.stats')}`, 'color: #3b82f6; font-weight: bold; font-size: 14px');
|
|
504
|
+
console.log(` ${this.t('stats.total')} %c${stats.total}`, 'color: #3b82f6; font-weight: bold');
|
|
505
|
+
console.log(` ${this.t('stats.success')} %c${stats.success} %c(${((stats.success / stats.total) * 100).toFixed(1)}%)`, 'color: #10b981; font-weight: bold', 'color: #666');
|
|
506
|
+
console.log(` ${this.t('stats.failed')} %c${stats.failed} %c(${((stats.failed / stats.total) * 100).toFixed(1)}%)`, 'color: #ef4444; font-weight: bold', 'color: #666');
|
|
507
|
+
console.log(` ${this.t('stats.avgLatency')} %c${stats.avgLatency.toFixed(0)}ms`, 'color: #666; font-weight: bold');
|
|
464
508
|
console.groupEnd();
|
|
465
509
|
}
|
|
466
510
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CPUConsole.js","sourceRoot":"","sources":["../../src/logging/CPUConsole.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE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AAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EACvG,mCAAmC,EACnC,aAAa,CACd,CAAA;QAED,OAAO,CAAC,GAAG,CACT,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EACpE,gCAAgC,CACjC,CAAA;QAED,OAAO,CAAC,QAAQ,EAAE,CAAA;IACpB,CAAC;CACF;AAED,SAAS;AACT,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAA;AAE1C,OAAO;AACP,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type CPUConsoleLocale = 'en' | 'zh-CN' | 'bilingual';
|
|
2
|
+
export type CPUConsoleI18nKey = 'instruction.created' | 'instruction.success' | 'instruction.cancelled' | 'instruction.failed' | 'optimistic.applied' | 'optimistic.rolledBack' | 'scheduler.conflictWait' | 'network.request' | 'network.response' | 'label.instructionInfo' | 'label.payload' | 'label.payloadDebugOnly' | 'label.callSourceDetails' | 'label.backendResult' | 'label.wbExecution' | 'label.rollbackReason' | 'label.pipelineStages' | 'label.details' | 'label.suggestions' | 'label.stats' | 'label.reason' | 'label.cancelStage' | 'label.totalDuration' | 'label.optimisticUpdate' | 'label.snapshotSaved' | 'stats.total' | 'stats.success' | 'stats.failed' | 'stats.avgLatency' | 'wb.commitOk' | 'wb.commitFail' | 'wb.commitArgs' | 'wb.commitError' | 'wb.commitUnknown' | 'wb.noCommit' | 'wb.rollbackExecuted' | 'wb.rollbackSnapshot' | 'wb.rollbackError' | 'wb.interruptRegistered' | 'common.unknownReason' | 'suggest.dbLocked' | 'suggest.network' | 'suggest.timeout' | 'suggest.slowInstruction';
|
|
3
|
+
export type CPUConsoleTranslate = (key: CPUConsoleI18nKey, params?: Record<string, any>) => string;
|
|
4
|
+
export declare function createCPUConsoleTranslator(locale: CPUConsoleLocale): CPUConsoleTranslate;
|
|
5
|
+
//# sourceMappingURL=console-i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-i18n.d.ts","sourceRoot":"","sources":["../../src/logging/console-i18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,OAAO,GAAG,WAAW,CAAA;AAE3D,MAAM,MAAM,iBAAiB,GACzB,qBAAqB,GACrB,qBAAqB,GACrB,uBAAuB,GACvB,oBAAoB,GACpB,oBAAoB,GACpB,uBAAuB,GACvB,wBAAwB,GACxB,iBAAiB,GACjB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,wBAAwB,GACxB,yBAAyB,GACzB,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,GACtB,sBAAsB,GACtB,eAAe,GACf,mBAAmB,GACnB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,wBAAwB,GACxB,qBAAqB,GACrB,aAAa,GACb,eAAe,GACf,cAAc,GACd,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,kBAAkB,GAClB,aAAa,GACb,qBAAqB,GACrB,qBAAqB,GACrB,kBAAkB,GAClB,wBAAwB,GACxB,sBAAsB,GACtB,kBAAkB,GAClB,iBAAiB,GACjB,iBAAiB,GACjB,yBAAyB,CAAA;AAE7B,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAA;AAuGlG,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,gBAAgB,GAAG,mBAAmB,CAMxF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const EN = {
|
|
2
|
+
'instruction.created': 'Instruction Created',
|
|
3
|
+
'instruction.success': 'Instruction Success',
|
|
4
|
+
'instruction.cancelled': 'Instruction Cancelled',
|
|
5
|
+
'instruction.failed': 'Instruction Failed',
|
|
6
|
+
'optimistic.applied': 'Optimistic Update',
|
|
7
|
+
'optimistic.rolledBack': 'Optimistic Rollback',
|
|
8
|
+
'scheduler.conflictWait': 'Resource conflict, waiting {waitTime}ms',
|
|
9
|
+
'network.request': 'HTTP Request',
|
|
10
|
+
'network.response': 'HTTP Response',
|
|
11
|
+
'label.instructionInfo': 'Instruction Info:',
|
|
12
|
+
'label.payload': 'Payload:',
|
|
13
|
+
'label.payloadDebugOnly': 'Payload: (use level=DEBUG to see payload)',
|
|
14
|
+
'label.callSourceDetails': 'Call Source Details:',
|
|
15
|
+
'label.backendResult': 'Backend Result:',
|
|
16
|
+
'label.wbExecution': 'WB Execution:',
|
|
17
|
+
'label.rollbackReason': 'Rollback Reason:',
|
|
18
|
+
'label.pipelineStages': 'Pipeline Stages:',
|
|
19
|
+
'label.details': 'Details:',
|
|
20
|
+
'label.suggestions': 'Suggestions:',
|
|
21
|
+
'label.stats': 'Pipeline Stats',
|
|
22
|
+
'label.reason': 'Reason:',
|
|
23
|
+
'label.cancelStage': 'Cancelled At:',
|
|
24
|
+
'label.totalDuration': 'Total:',
|
|
25
|
+
'label.optimisticUpdate': 'Optimistic Update',
|
|
26
|
+
'label.snapshotSaved': 'snapshot saved (for rollback)',
|
|
27
|
+
'stats.total': 'Total:',
|
|
28
|
+
'stats.success': 'Success:',
|
|
29
|
+
'stats.failed': 'Failed:',
|
|
30
|
+
'stats.avgLatency': 'Avg latency:',
|
|
31
|
+
'wb.commitOk': '✅ commit() succeeded',
|
|
32
|
+
'wb.commitFail': '❌ commit() failed',
|
|
33
|
+
'wb.commitArgs': '📝 commit args:',
|
|
34
|
+
'wb.commitError': '🚨 commit error:',
|
|
35
|
+
'wb.commitUnknown': '⚠️ commit() status unknown',
|
|
36
|
+
'wb.noCommit': '⏭️ no commit()',
|
|
37
|
+
'wb.rollbackExecuted': '🔄 optimistic rollback executed',
|
|
38
|
+
'wb.rollbackSnapshot': '📋 rollback snapshot:',
|
|
39
|
+
'wb.rollbackError': '🚨 rollback error:',
|
|
40
|
+
'wb.interruptRegistered': '🎯 registered to interrupt handler (SSE dedup)',
|
|
41
|
+
'common.unknownReason': 'Unknown',
|
|
42
|
+
'suggest.dbLocked': 'Backend database is locked; check write lock/transaction handling.',
|
|
43
|
+
'suggest.network': 'Network error; check whether backend service is running.',
|
|
44
|
+
'suggest.timeout': 'Request timeout; consider increasing timeout or optimizing backend.',
|
|
45
|
+
'suggest.slowInstruction': 'Execution took {duration}ms (> 1000ms); investigate performance.',
|
|
46
|
+
};
|
|
47
|
+
const ZH_CN = {
|
|
48
|
+
'instruction.created': '指令创建',
|
|
49
|
+
'instruction.success': '指令成功',
|
|
50
|
+
'instruction.cancelled': '指令取消',
|
|
51
|
+
'instruction.failed': '指令失败',
|
|
52
|
+
'optimistic.applied': '乐观更新',
|
|
53
|
+
'optimistic.rolledBack': '乐观回滚',
|
|
54
|
+
'scheduler.conflictWait': '资源冲突,等待 {waitTime}ms',
|
|
55
|
+
'network.request': '网络请求',
|
|
56
|
+
'network.response': '网络响应',
|
|
57
|
+
'label.instructionInfo': '指令信息:',
|
|
58
|
+
'label.payload': '指令参数 (Payload):',
|
|
59
|
+
'label.payloadDebugOnly': '指令参数: (use level=DEBUG to see payload)',
|
|
60
|
+
'label.callSourceDetails': '调用源详情:',
|
|
61
|
+
'label.backendResult': '后端返回 (Result):',
|
|
62
|
+
'label.wbExecution': 'WB阶段执行记录:',
|
|
63
|
+
'label.rollbackReason': '回滚原因:',
|
|
64
|
+
'label.pipelineStages': '流水线阶段:',
|
|
65
|
+
'label.details': '详细信息:',
|
|
66
|
+
'label.suggestions': '建议:',
|
|
67
|
+
'label.stats': '流水线统计',
|
|
68
|
+
'label.reason': '原因:',
|
|
69
|
+
'label.cancelStage': '取消阶段:',
|
|
70
|
+
'label.totalDuration': '总耗时:',
|
|
71
|
+
'label.optimisticUpdate': '乐观更新',
|
|
72
|
+
'label.snapshotSaved': '已保存快照(用于回滚)',
|
|
73
|
+
'stats.total': '总指令数:',
|
|
74
|
+
'stats.success': '成功:',
|
|
75
|
+
'stats.failed': '失败:',
|
|
76
|
+
'stats.avgLatency': '平均延迟:',
|
|
77
|
+
'wb.commitOk': '✅ commit() 函数执行成功',
|
|
78
|
+
'wb.commitFail': '❌ commit() 函数执行失败',
|
|
79
|
+
'wb.commitArgs': '📝 commit 调用参数:',
|
|
80
|
+
'wb.commitError': '🚨 commit 错误:',
|
|
81
|
+
'wb.commitUnknown': '⚠️ commit() 状态未知',
|
|
82
|
+
'wb.noCommit': '⏭️ 无 commit() 函数',
|
|
83
|
+
'wb.rollbackExecuted': '🔄 执行了乐观更新回滚',
|
|
84
|
+
'wb.rollbackSnapshot': '📋 回滚快照:',
|
|
85
|
+
'wb.rollbackError': '🚨 回滚错误:',
|
|
86
|
+
'wb.interruptRegistered': '🎯 已注册到中断处理器 (SSE去重)',
|
|
87
|
+
'common.unknownReason': '未知原因',
|
|
88
|
+
'suggest.dbLocked': '后端数据库锁定,检查写入许可/事务锁是否正确获取',
|
|
89
|
+
'suggest.network': '网络错误,检查后端服务是否运行',
|
|
90
|
+
'suggest.timeout': '请求超时,考虑增加超时时间或优化后端性能',
|
|
91
|
+
'suggest.slowInstruction': '执行耗时 {duration}ms,超过 1 秒,检查是否存在性能问题',
|
|
92
|
+
};
|
|
93
|
+
function format(template, params) {
|
|
94
|
+
if (!params)
|
|
95
|
+
return template;
|
|
96
|
+
return template.replace(/\{(\w+)\}/g, (_, key) => String(params[key] ?? `{${key}}`));
|
|
97
|
+
}
|
|
98
|
+
export function createCPUConsoleTranslator(locale) {
|
|
99
|
+
if (locale === 'bilingual') {
|
|
100
|
+
return (key, params) => `${format(ZH_CN[key], params)} / ${format(EN[key], params)}`;
|
|
101
|
+
}
|
|
102
|
+
const dict = locale === 'zh-CN' ? ZH_CN : EN;
|
|
103
|
+
return (key, params) => format(dict[key], params);
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=console-i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-i18n.js","sourceRoot":"","sources":["../../src/logging/console-i18n.ts"],"names":[],"mappings":"AAoDA,MAAM,EAAE,GAAS;IACf,qBAAqB,EAAE,qBAAqB;IAC5C,qBAAqB,EAAE,qBAAqB;IAC5C,uBAAuB,EAAE,uBAAuB;IAChD,oBAAoB,EAAE,oBAAoB;IAC1C,oBAAoB,EAAE,mBAAmB;IACzC,uBAAuB,EAAE,qBAAqB;IAC9C,wBAAwB,EAAE,yCAAyC;IACnE,iBAAiB,EAAE,cAAc;IACjC,kBAAkB,EAAE,eAAe;IACnC,uBAAuB,EAAE,mBAAmB;IAC5C,eAAe,EAAE,UAAU;IAC3B,wBAAwB,EAAE,2CAA2C;IACrE,yBAAyB,EAAE,sBAAsB;IACjD,qBAAqB,EAAE,iBAAiB;IACxC,mBAAmB,EAAE,eAAe;IACpC,sBAAsB,EAAE,kBAAkB;IAC1C,sBAAsB,EAAE,kBAAkB;IAC1C,eAAe,EAAE,UAAU;IAC3B,mBAAmB,EAAE,cAAc;IACnC,aAAa,EAAE,gBAAgB;IAC/B,cAAc,EAAE,SAAS;IACzB,mBAAmB,EAAE,eAAe;IACpC,qBAAqB,EAAE,QAAQ;IAC/B,wBAAwB,EAAE,mBAAmB;IAC7C,qBAAqB,EAAE,+BAA+B;IACtD,aAAa,EAAE,QAAQ;IACvB,eAAe,EAAE,UAAU;IAC3B,cAAc,EAAE,SAAS;IACzB,kBAAkB,EAAE,cAAc;IAClC,aAAa,EAAE,sBAAsB;IACrC,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,kBAAkB,EAAE,4BAA4B;IAChD,aAAa,EAAE,gBAAgB;IAC/B,qBAAqB,EAAE,iCAAiC;IACxD,qBAAqB,EAAE,uBAAuB;IAC9C,kBAAkB,EAA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UAAU;IAC9B,wBAAwB,EAAE,sBAAsB;IAChD,sBAAsB,EAAE,MAAM;IAC9B,kBAAkB,EAAE,0BAA0B;IAC9C,iBAAiB,EAAE,iBAAiB;IACpC,iBAAiB,EAAE,sBAAsB;IACzC,yBAAyB,EAAE,qCAAqC;CACjE,CAAA;AAED,SAAS,MAAM,CAAC,QAAgB,EAAE,MAAuC;IACvE,IAAI,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAA;IAC5B,OAAO,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,GAAW,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC,CAAA;AAC9F,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,MAAwB;IACjE,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,CAAA;IACtF,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAA;AACnD,CAAC"}
|
package/dist/logging/index.d.ts
CHANGED
|
@@ -6,5 +6,7 @@ export { cpuEventCollector, CPUEventCollector } from './CPUEventCollector';
|
|
|
6
6
|
export { cpuLogger, CPULogger } from './CPULogger';
|
|
7
7
|
export { cpuDebugger, CPUDebugger } from './CPUDebugger';
|
|
8
8
|
export { cpuConsole, CPUConsole } from './CPUConsole';
|
|
9
|
+
export type { CPUConsoleLocale, CPUConsoleTranslate, CPUConsoleI18nKey } from './console-i18n';
|
|
10
|
+
export { createCPUConsoleTranslator } from './console-i18n';
|
|
9
11
|
export { captureCallSource, formatCallSource, formatCallSourceShort } from './stack-parser';
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logging/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAGpF,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAG1E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGlD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAGxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logging/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAGpF,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAG1E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGlD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAGxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACrD,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAG3D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/logging/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { cpuLogger, CPULogger } from './CPULogger';
|
|
|
11
11
|
export { cpuDebugger, CPUDebugger } from './CPUDebugger';
|
|
12
12
|
// 控制台
|
|
13
13
|
export { cpuConsole, CPUConsole } from './CPUConsole';
|
|
14
|
+
export { createCPUConsoleTranslator } from './console-i18n';
|
|
14
15
|
// 调用栈解析工具
|
|
15
16
|
export { captureCallSource, formatCallSource, formatCallSourceShort } from './stack-parser';
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logging/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,KAAK;AACL,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkC,MAAM,SAAS,CAAA;AAEpF,QAAQ;AACR,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE1E,QAAQ;AACR,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM;AACN,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAExD,MAAM;AACN,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAErD,UAAU;AACV,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logging/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,KAAK;AACL,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkC,MAAM,SAAS,CAAA;AAEpF,QAAQ;AACR,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE1E,QAAQ;AACR,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM;AACN,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAExD,MAAM;AACN,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAErD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAE3D,UAAU;AACV,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA"}
|
package/package.json
CHANGED
|
@@ -11,16 +11,43 @@
|
|
|
11
11
|
import type { QueuedInstruction } from '../types'
|
|
12
12
|
import { ConsoleLevel } from './types'
|
|
13
13
|
import { formatCallSourceShort } from './stack-parser'
|
|
14
|
+
import {
|
|
15
|
+
createCPUConsoleTranslator,
|
|
16
|
+
type CPUConsoleLocale,
|
|
17
|
+
type CPUConsoleTranslate,
|
|
18
|
+
} from './console-i18n'
|
|
14
19
|
|
|
15
20
|
export class CPUConsole {
|
|
16
21
|
private enabled: boolean = true
|
|
17
22
|
private level: ConsoleLevel = ConsoleLevel.NORMAL
|
|
18
23
|
private filter: Set<string> = new Set() // 指令类型过滤
|
|
24
|
+
private locale: CPUConsoleLocale = this.getDefaultLocale()
|
|
25
|
+
private translator: CPUConsoleTranslate = createCPUConsoleTranslator(this.locale)
|
|
19
26
|
|
|
20
27
|
constructor() {
|
|
21
28
|
this.loadSettings()
|
|
22
29
|
}
|
|
23
30
|
|
|
31
|
+
/**
|
|
32
|
+
* 设置语言(en / zh-CN / bilingual)
|
|
33
|
+
*/
|
|
34
|
+
setLocale(locale: CPUConsoleLocale): void {
|
|
35
|
+
this.locale = locale
|
|
36
|
+
this.translator = createCPUConsoleTranslator(locale)
|
|
37
|
+
localStorage.setItem('cpu-console-locale', locale)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 自定义翻译函数(不依赖任何 i18n 框架)
|
|
42
|
+
*/
|
|
43
|
+
setI18nTranslator(t: CPUConsoleTranslate): void {
|
|
44
|
+
this.translator = t
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
getLocale(): CPUConsoleLocale {
|
|
48
|
+
return this.locale
|
|
49
|
+
}
|
|
50
|
+
|
|
24
51
|
/**
|
|
25
52
|
* 加载设置
|
|
26
53
|
*/
|
|
@@ -39,6 +66,25 @@ export class CPUConsole {
|
|
|
39
66
|
// 忽略解析错误
|
|
40
67
|
}
|
|
41
68
|
}
|
|
69
|
+
|
|
70
|
+
const savedLocale = localStorage.getItem('cpu-console-locale') as CPUConsoleLocale | null
|
|
71
|
+
if (savedLocale === 'en' || savedLocale === 'zh-CN' || savedLocale === 'bilingual') {
|
|
72
|
+
this.locale = savedLocale
|
|
73
|
+
this.translator = createCPUConsoleTranslator(savedLocale)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private t(key: Parameters<CPUConsoleTranslate>[0], params?: Parameters<CPUConsoleTranslate>[1]): string {
|
|
78
|
+
return this.translator(key as any, params)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private getDefaultLocale(): CPUConsoleLocale {
|
|
82
|
+
// 默认策略:中文环境输出双语,否则英文
|
|
83
|
+
if (typeof navigator !== 'undefined') {
|
|
84
|
+
const lang = navigator.language || ''
|
|
85
|
+
if (lang.toLowerCase().startsWith('zh')) return 'bilingual'
|
|
86
|
+
}
|
|
87
|
+
return 'en'
|
|
42
88
|
}
|
|
43
89
|
|
|
44
90
|
/**
|
|
@@ -82,7 +128,7 @@ export class CPUConsole {
|
|
|
82
128
|
|
|
83
129
|
// 🎯 使用与指令成功一致的分组格式
|
|
84
130
|
console.groupCollapsed(
|
|
85
|
-
`%c[
|
|
131
|
+
`%c[${this.t('instruction.created')}] %c${this.formatTime()} %c${instruction.type}%c${callSourceInfo}`,
|
|
86
132
|
'color: #3b82f6; font-weight: bold',
|
|
87
133
|
'color: #666; font-size: 11px',
|
|
88
134
|
'color: #3b82f6; font-weight: bold; background: #3b82f615; padding: 2px 6px; border-radius: 3px',
|
|
@@ -91,7 +137,7 @@ export class CPUConsole {
|
|
|
91
137
|
)
|
|
92
138
|
|
|
93
139
|
// 🔥 显示指令基本信息
|
|
94
|
-
console.log(
|
|
140
|
+
console.log(`%c📋 ${this.t('label.instructionInfo')}`, 'color: #3b82f6; font-weight: bold')
|
|
95
141
|
console.table({
|
|
96
142
|
'Instruction ID': instruction.id,
|
|
97
143
|
'Correlation ID': instruction.context.correlationId,
|
|
@@ -103,15 +149,15 @@ export class CPUConsole {
|
|
|
103
149
|
|
|
104
150
|
// 🔥 显示指令参数
|
|
105
151
|
if (this.level >= ConsoleLevel.DEBUG) {
|
|
106
|
-
console.log(
|
|
152
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold')
|
|
107
153
|
console.log(instruction.payload)
|
|
108
154
|
} else {
|
|
109
|
-
console.log(
|
|
155
|
+
console.log(`%c📝 ${this.t('label.payloadDebugOnly')}`, 'color: #666; font-style: italic')
|
|
110
156
|
}
|
|
111
157
|
|
|
112
158
|
// 🔥 显示调用源详情
|
|
113
159
|
if (instruction.context.callSource && this.level >= ConsoleLevel.VERBOSE) {
|
|
114
|
-
console.log(
|
|
160
|
+
console.log(`%c📍 ${this.t('label.callSourceDetails')}`, 'color: #8b5cf6; font-weight: bold')
|
|
115
161
|
console.table({
|
|
116
162
|
'File': instruction.context.callSource.file,
|
|
117
163
|
'Line': instruction.context.callSource.line,
|
|
@@ -137,7 +183,7 @@ export class CPUConsole {
|
|
|
137
183
|
|
|
138
184
|
// 🎯 核心:折叠分组,方便查看
|
|
139
185
|
console.groupCollapsed(
|
|
140
|
-
`%c[
|
|
186
|
+
`%c[${this.t('instruction.success')}] %c${this.formatTime()} %c${instruction.type}%c %c${duration}ms${callSourceInfo}`,
|
|
141
187
|
'color: #10b981; font-weight: bold',
|
|
142
188
|
'color: #666; font-size: 11px',
|
|
143
189
|
'color: #10b981; font-weight: bold; background: #10b98115; padding: 2px 6px; border-radius: 3px',
|
|
@@ -148,47 +194,47 @@ export class CPUConsole {
|
|
|
148
194
|
|
|
149
195
|
// 🔥 显示指令输入参数
|
|
150
196
|
if (this.level >= ConsoleLevel.NORMAL) {
|
|
151
|
-
console.log(
|
|
197
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold')
|
|
152
198
|
console.log(instruction.payload)
|
|
153
199
|
}
|
|
154
200
|
|
|
155
201
|
// 🔥 显示后端返回结果
|
|
156
202
|
if (instruction.result && this.level >= ConsoleLevel.NORMAL) {
|
|
157
|
-
console.log(
|
|
203
|
+
console.log(`%c📥 ${this.t('label.backendResult')}`, 'color: #10b981; font-weight: bold')
|
|
158
204
|
console.log(instruction.result)
|
|
159
205
|
}
|
|
160
206
|
|
|
161
207
|
// 🔥 显示WB阶段真实执行内容
|
|
162
208
|
if (this.level >= ConsoleLevel.VERBOSE && instruction.writeBackExecution) {
|
|
163
209
|
const wbExec = instruction.writeBackExecution
|
|
164
|
-
console.log(
|
|
210
|
+
console.log(`%c💾 ${this.t('label.wbExecution')}`, 'color: #8b5cf6; font-weight: bold')
|
|
165
211
|
|
|
166
212
|
if (wbExec.hasCommit) {
|
|
167
213
|
if (wbExec.commitSuccess === true) {
|
|
168
|
-
console.log(
|
|
169
|
-
console.log(
|
|
214
|
+
console.log(` ${this.t('wb.commitOk')}`)
|
|
215
|
+
console.log(` ${this.t('wb.commitArgs')}`, wbExec.commitArgs)
|
|
170
216
|
} else if (wbExec.commitSuccess === false) {
|
|
171
|
-
console.log(
|
|
172
|
-
console.log(
|
|
173
|
-
console.log(
|
|
217
|
+
console.log(` ${this.t('wb.commitFail')}`)
|
|
218
|
+
console.log(` ${this.t('wb.commitArgs')}`, wbExec.commitArgs)
|
|
219
|
+
console.log(` ${this.t('wb.commitError')}`, wbExec.commitError)
|
|
174
220
|
} else {
|
|
175
|
-
console.log(
|
|
221
|
+
console.log(` ${this.t('wb.commitUnknown')}`)
|
|
176
222
|
}
|
|
177
223
|
} else {
|
|
178
|
-
console.log(
|
|
224
|
+
console.log(` ${this.t('wb.noCommit')}`)
|
|
179
225
|
}
|
|
180
226
|
|
|
181
227
|
if (wbExec.rollbackExecuted) {
|
|
182
|
-
console.log(
|
|
183
|
-
console.log(
|
|
228
|
+
console.log(` ${this.t('wb.rollbackExecuted')}`)
|
|
229
|
+
console.log(` ${this.t('wb.rollbackSnapshot')}`, wbExec.rollbackSnapshot)
|
|
184
230
|
if (wbExec.rollbackError) {
|
|
185
|
-
console.log(
|
|
231
|
+
console.log(` ${this.t('wb.rollbackError')}`, wbExec.rollbackError)
|
|
186
232
|
}
|
|
187
233
|
}
|
|
188
234
|
|
|
189
235
|
// 显示中断处理器注册(成功时)
|
|
190
236
|
if (instruction.status === 'committed') {
|
|
191
|
-
console.log(
|
|
237
|
+
console.log(` ${this.t('wb.interruptRegistered')}`)
|
|
192
238
|
}
|
|
193
239
|
}
|
|
194
240
|
|
|
@@ -218,7 +264,7 @@ export class CPUConsole {
|
|
|
218
264
|
|
|
219
265
|
// 使用橙色表示取消(不同于红色的失败)
|
|
220
266
|
console.groupCollapsed(
|
|
221
|
-
`%c[
|
|
267
|
+
`%c[${this.t('instruction.cancelled')}] %c${this.formatTime()} %c${instruction.type}%c %c${duration}ms${callSourceInfo}`,
|
|
222
268
|
'color: #f59e0b; font-weight: bold',
|
|
223
269
|
'color: #666; font-size: 11px',
|
|
224
270
|
'color: #f59e0b; font-weight: bold; background: #f59e0b15; padding: 2px 6px; border-radius: 3px',
|
|
@@ -229,21 +275,21 @@ export class CPUConsole {
|
|
|
229
275
|
|
|
230
276
|
// 显示取消原因
|
|
231
277
|
console.warn(
|
|
232
|
-
`%c
|
|
278
|
+
`%c${this.t('label.reason')} ${instruction.cancelReason || this.t('common.unknownReason')}`,
|
|
233
279
|
'color: #f59e0b; font-weight: bold'
|
|
234
280
|
)
|
|
235
281
|
|
|
236
282
|
// 显示取消阶段
|
|
237
283
|
if (instruction.cancelledAt) {
|
|
238
284
|
console.log(
|
|
239
|
-
`%c🔸
|
|
285
|
+
`%c🔸 ${this.t('label.cancelStage')} ${instruction.cancelledAt}`,
|
|
240
286
|
'color: #f59e0b'
|
|
241
287
|
)
|
|
242
288
|
}
|
|
243
289
|
|
|
244
290
|
// 🔥 显示指令输入参数
|
|
245
291
|
if (this.level >= ConsoleLevel.NORMAL) {
|
|
246
|
-
console.log(
|
|
292
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold')
|
|
247
293
|
console.log(instruction.payload)
|
|
248
294
|
}
|
|
249
295
|
|
|
@@ -268,7 +314,7 @@ export class CPUConsole {
|
|
|
268
314
|
|
|
269
315
|
// 🔥 失败时自动展开,方便排查
|
|
270
316
|
console.group(
|
|
271
|
-
`%c[
|
|
317
|
+
`%c[${this.t('instruction.failed')}] %c${this.formatTime()} %c${instruction.type}%c %c${duration}ms${callSourceInfo}`,
|
|
272
318
|
'color: #ef4444; font-weight: bold',
|
|
273
319
|
'color: #666; font-size: 11px',
|
|
274
320
|
'color: #ef4444; font-weight: bold; background: #ef444415; padding: 2px 6px; border-radius: 3px',
|
|
@@ -278,17 +324,17 @@ export class CPUConsole {
|
|
|
278
324
|
)
|
|
279
325
|
|
|
280
326
|
// 显示错误信息
|
|
281
|
-
console.error(`%c
|
|
327
|
+
console.error(`%c${this.t('label.reason')} ${error.message}`, 'color: #ef4444; font-weight: bold')
|
|
282
328
|
|
|
283
329
|
// 🔥 显示指令输入参数
|
|
284
330
|
if (this.level >= ConsoleLevel.NORMAL) {
|
|
285
|
-
console.log(
|
|
331
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #3b82f6; font-weight: bold')
|
|
286
332
|
console.log(instruction.payload)
|
|
287
333
|
}
|
|
288
334
|
|
|
289
335
|
// 显示是否回滚
|
|
290
336
|
if (instruction.optimisticSnapshot) {
|
|
291
|
-
console.log(
|
|
337
|
+
console.log(`%c🔄 ${this.t('optimistic.rolledBack')}`, 'color: #f59e0b; font-weight: bold')
|
|
292
338
|
}
|
|
293
339
|
|
|
294
340
|
// 显示流水线阶段
|
|
@@ -321,7 +367,7 @@ export class CPUConsole {
|
|
|
321
367
|
: ''
|
|
322
368
|
|
|
323
369
|
console.groupCollapsed(
|
|
324
|
-
`%c[
|
|
370
|
+
`%c[${this.t('optimistic.applied')}] %c${this.formatTime()} %c${instruction.type}%c${callSourceInfo}`,
|
|
325
371
|
'color: #8b5cf6; font-weight: bold',
|
|
326
372
|
'color: #666; font-size: 11px',
|
|
327
373
|
'color: #8b5cf6; font-weight: bold; background: #8b5cf615; padding: 2px 6px; border-radius: 3px',
|
|
@@ -331,13 +377,13 @@ export class CPUConsole {
|
|
|
331
377
|
|
|
332
378
|
// 显示乐观更新的 payload
|
|
333
379
|
if (this.level >= ConsoleLevel.DEBUG) {
|
|
334
|
-
console.log(
|
|
380
|
+
console.log(`%c📝 ${this.t('label.payload')}`, 'color: #8b5cf6; font-weight: bold')
|
|
335
381
|
console.log(instruction.payload)
|
|
336
382
|
}
|
|
337
383
|
|
|
338
384
|
// 显示快照信息
|
|
339
385
|
if (instruction.optimisticSnapshot) {
|
|
340
|
-
console.log(
|
|
386
|
+
console.log(`%c💾 ${this.t('label.snapshotSaved')}`, 'color: #10b981; font-size: 11px')
|
|
341
387
|
}
|
|
342
388
|
|
|
343
389
|
console.groupEnd()
|
|
@@ -359,7 +405,7 @@ export class CPUConsole {
|
|
|
359
405
|
|
|
360
406
|
// 🔥 回滚重要,使用展开分组便于立即查看
|
|
361
407
|
console.group(
|
|
362
|
-
`%c[
|
|
408
|
+
`%c[${this.t('optimistic.rolledBack')}] %c${this.formatTime()} %c${instruction.type}%c${callSourceInfo}`,
|
|
363
409
|
'color: #f59e0b; font-weight: bold',
|
|
364
410
|
'color: #666; font-size: 11px',
|
|
365
411
|
'color: #f59e0b; font-weight: bold; background: #f59e0b15; padding: 2px 6px; border-radius: 3px',
|
|
@@ -368,11 +414,11 @@ export class CPUConsole {
|
|
|
368
414
|
)
|
|
369
415
|
|
|
370
416
|
// 显示回滚原因
|
|
371
|
-
console.log(
|
|
417
|
+
console.log(`%c⚠️ ${this.t('label.rollbackReason')}`, 'color: #f59e0b; font-weight: bold')
|
|
372
418
|
console.log(reason)
|
|
373
419
|
|
|
374
420
|
// 显示指令信息
|
|
375
|
-
console.log(
|
|
421
|
+
console.log(`%c📋 ${this.t('label.instructionInfo')}`, 'color: #f59e0b; font-weight: bold')
|
|
376
422
|
console.table({
|
|
377
423
|
'Instruction ID': instruction.id,
|
|
378
424
|
'Correlation ID': instruction.context.correlationId,
|
|
@@ -394,7 +440,7 @@ export class CPUConsole {
|
|
|
394
440
|
if (!this.shouldPrint(instruction.type)) return
|
|
395
441
|
|
|
396
442
|
if (this.level >= ConsoleLevel.VERBOSE) {
|
|
397
|
-
console.log(`%c ⏳ ${this.formatTime()}
|
|
443
|
+
console.log(`%c ⏳ ${this.formatTime()} ${this.t('scheduler.conflictWait', { waitTime })}`, 'color: #f59e0b', {
|
|
398
444
|
instructionId: instruction.id,
|
|
399
445
|
conflictingWith,
|
|
400
446
|
})
|
|
@@ -441,7 +487,7 @@ export class CPUConsole {
|
|
|
441
487
|
private printPipelineStages(instruction: QueuedInstruction): void {
|
|
442
488
|
const timestamps = instruction.timestamps
|
|
443
489
|
|
|
444
|
-
console.log(
|
|
490
|
+
console.log(`%c${this.t('label.pipelineStages')}`, 'color: #666; font-weight: bold')
|
|
445
491
|
|
|
446
492
|
// 打印各阶段之间的耗时
|
|
447
493
|
const transitions = []
|
|
@@ -470,7 +516,7 @@ export class CPUConsole {
|
|
|
470
516
|
if (timestamps.IF && timestamps.WB) {
|
|
471
517
|
const total = timestamps.WB - timestamps.IF
|
|
472
518
|
console.log(
|
|
473
|
-
` %c
|
|
519
|
+
` %c${this.t('label.totalDuration')} %c${total}ms`,
|
|
474
520
|
'color: #666; font-weight: bold',
|
|
475
521
|
'color: #10b981; font-weight: bold; font-size: 14px'
|
|
476
522
|
)
|
|
@@ -478,7 +524,7 @@ export class CPUConsole {
|
|
|
478
524
|
|
|
479
525
|
// 特殊标记
|
|
480
526
|
if (instruction.optimisticSnapshot) {
|
|
481
|
-
console.log(
|
|
527
|
+
console.log(` %c✓ ${this.t('label.optimisticUpdate')}`, 'color: #8b5cf6')
|
|
482
528
|
}
|
|
483
529
|
}
|
|
484
530
|
|
|
@@ -486,7 +532,7 @@ export class CPUConsole {
|
|
|
486
532
|
* 打印指令详情
|
|
487
533
|
*/
|
|
488
534
|
private printInstructionDetails(instruction: QueuedInstruction): void {
|
|
489
|
-
console.log(
|
|
535
|
+
console.log(`%c${this.t('label.details')}`, 'color: #666; font-weight: bold')
|
|
490
536
|
console.table({
|
|
491
537
|
'Instruction ID': instruction.id,
|
|
492
538
|
'Correlation ID': instruction.context.correlationId,
|
|
@@ -498,10 +544,10 @@ export class CPUConsole {
|
|
|
498
544
|
})
|
|
499
545
|
|
|
500
546
|
if (this.level >= ConsoleLevel.DEBUG) {
|
|
501
|
-
console.log('
|
|
547
|
+
console.log(`%c${this.t('label.payload')}`, 'color: #666; font-weight: bold', instruction.payload)
|
|
502
548
|
|
|
503
549
|
if (instruction.result) {
|
|
504
|
-
console.log('
|
|
550
|
+
console.log(`%c${this.t('label.backendResult')}`, 'color: #666; font-weight: bold', instruction.result)
|
|
505
551
|
}
|
|
506
552
|
}
|
|
507
553
|
}
|
|
@@ -514,15 +560,15 @@ export class CPUConsole {
|
|
|
514
560
|
|
|
515
561
|
// 根据错误类型给出建议
|
|
516
562
|
if (error.message.includes('database is locked')) {
|
|
517
|
-
suggestions.push('
|
|
563
|
+
suggestions.push(this.t('suggest.dbLocked'))
|
|
518
564
|
}
|
|
519
565
|
|
|
520
566
|
if (error.message.includes('Network')) {
|
|
521
|
-
suggestions.push('
|
|
567
|
+
suggestions.push(this.t('suggest.network'))
|
|
522
568
|
}
|
|
523
569
|
|
|
524
570
|
if (error.message.includes('timeout')) {
|
|
525
|
-
suggestions.push('
|
|
571
|
+
suggestions.push(this.t('suggest.timeout'))
|
|
526
572
|
}
|
|
527
573
|
|
|
528
574
|
// 根据指令类型给出建议
|
|
@@ -532,11 +578,11 @@ export class CPUConsole {
|
|
|
532
578
|
: 0
|
|
533
579
|
|
|
534
580
|
if (duration > 1000) {
|
|
535
|
-
suggestions.push(
|
|
581
|
+
suggestions.push(this.t('suggest.slowInstruction', { duration }))
|
|
536
582
|
}
|
|
537
583
|
|
|
538
584
|
if (suggestions.length > 0) {
|
|
539
|
-
console.log(
|
|
585
|
+
console.log(`%c💡 ${this.t('label.suggestions')}`, 'color: #f59e0b; font-weight: bold')
|
|
540
586
|
suggestions.forEach((s) => {
|
|
541
587
|
console.log(` • ${s}`)
|
|
542
588
|
})
|
|
@@ -559,7 +605,15 @@ export class CPUConsole {
|
|
|
559
605
|
*/
|
|
560
606
|
private formatTime(): string {
|
|
561
607
|
const now = new Date()
|
|
562
|
-
|
|
608
|
+
const timeLocale =
|
|
609
|
+
this.locale === 'zh-CN'
|
|
610
|
+
? 'zh-CN'
|
|
611
|
+
: this.locale === 'en'
|
|
612
|
+
? 'en-GB'
|
|
613
|
+
: typeof navigator !== 'undefined' && (navigator.language || '').toLowerCase().startsWith('zh')
|
|
614
|
+
? 'zh-CN'
|
|
615
|
+
: 'en-GB'
|
|
616
|
+
return now.toLocaleTimeString(timeLocale, {
|
|
563
617
|
hour12: false,
|
|
564
618
|
hour: '2-digit',
|
|
565
619
|
minute: '2-digit',
|
|
@@ -602,23 +656,26 @@ export class CPUConsole {
|
|
|
602
656
|
printStats(stats: { total: number; success: number; failed: number; avgLatency: number }): void {
|
|
603
657
|
if (!this.enabled) return
|
|
604
658
|
|
|
605
|
-
console.group(
|
|
659
|
+
console.group(`%c📊 ${this.t('label.stats')}`, 'color: #3b82f6; font-weight: bold; font-size: 14px')
|
|
606
660
|
|
|
607
|
-
console.log(`
|
|
661
|
+
console.log(` ${this.t('stats.total')} %c${stats.total}`, 'color: #3b82f6; font-weight: bold')
|
|
608
662
|
|
|
609
663
|
console.log(
|
|
610
|
-
`
|
|
664
|
+
` ${this.t('stats.success')} %c${stats.success} %c(${((stats.success / stats.total) * 100).toFixed(1)}%)`,
|
|
611
665
|
'color: #10b981; font-weight: bold',
|
|
612
666
|
'color: #666'
|
|
613
667
|
)
|
|
614
668
|
|
|
615
669
|
console.log(
|
|
616
|
-
`
|
|
670
|
+
` ${this.t('stats.failed')} %c${stats.failed} %c(${((stats.failed / stats.total) * 100).toFixed(1)}%)`,
|
|
617
671
|
'color: #ef4444; font-weight: bold',
|
|
618
672
|
'color: #666'
|
|
619
673
|
)
|
|
620
674
|
|
|
621
|
-
console.log(
|
|
675
|
+
console.log(
|
|
676
|
+
` ${this.t('stats.avgLatency')} %c${stats.avgLatency.toFixed(0)}ms`,
|
|
677
|
+
'color: #666; font-weight: bold'
|
|
678
|
+
)
|
|
622
679
|
|
|
623
680
|
console.groupEnd()
|
|
624
681
|
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
export type CPUConsoleLocale = 'en' | 'zh-CN' | 'bilingual'
|
|
2
|
+
|
|
3
|
+
export type CPUConsoleI18nKey =
|
|
4
|
+
| 'instruction.created'
|
|
5
|
+
| 'instruction.success'
|
|
6
|
+
| 'instruction.cancelled'
|
|
7
|
+
| 'instruction.failed'
|
|
8
|
+
| 'optimistic.applied'
|
|
9
|
+
| 'optimistic.rolledBack'
|
|
10
|
+
| 'scheduler.conflictWait'
|
|
11
|
+
| 'network.request'
|
|
12
|
+
| 'network.response'
|
|
13
|
+
| 'label.instructionInfo'
|
|
14
|
+
| 'label.payload'
|
|
15
|
+
| 'label.payloadDebugOnly'
|
|
16
|
+
| 'label.callSourceDetails'
|
|
17
|
+
| 'label.backendResult'
|
|
18
|
+
| 'label.wbExecution'
|
|
19
|
+
| 'label.rollbackReason'
|
|
20
|
+
| 'label.pipelineStages'
|
|
21
|
+
| 'label.details'
|
|
22
|
+
| 'label.suggestions'
|
|
23
|
+
| 'label.stats'
|
|
24
|
+
| 'label.reason'
|
|
25
|
+
| 'label.cancelStage'
|
|
26
|
+
| 'label.totalDuration'
|
|
27
|
+
| 'label.optimisticUpdate'
|
|
28
|
+
| 'label.snapshotSaved'
|
|
29
|
+
| 'stats.total'
|
|
30
|
+
| 'stats.success'
|
|
31
|
+
| 'stats.failed'
|
|
32
|
+
| 'stats.avgLatency'
|
|
33
|
+
| 'wb.commitOk'
|
|
34
|
+
| 'wb.commitFail'
|
|
35
|
+
| 'wb.commitArgs'
|
|
36
|
+
| 'wb.commitError'
|
|
37
|
+
| 'wb.commitUnknown'
|
|
38
|
+
| 'wb.noCommit'
|
|
39
|
+
| 'wb.rollbackExecuted'
|
|
40
|
+
| 'wb.rollbackSnapshot'
|
|
41
|
+
| 'wb.rollbackError'
|
|
42
|
+
| 'wb.interruptRegistered'
|
|
43
|
+
| 'common.unknownReason'
|
|
44
|
+
| 'suggest.dbLocked'
|
|
45
|
+
| 'suggest.network'
|
|
46
|
+
| 'suggest.timeout'
|
|
47
|
+
| 'suggest.slowInstruction'
|
|
48
|
+
|
|
49
|
+
export type CPUConsoleTranslate = (key: CPUConsoleI18nKey, params?: Record<string, any>) => string
|
|
50
|
+
|
|
51
|
+
type Dict = Record<CPUConsoleI18nKey, string>
|
|
52
|
+
|
|
53
|
+
const EN: Dict = {
|
|
54
|
+
'instruction.created': 'Instruction Created',
|
|
55
|
+
'instruction.success': 'Instruction Success',
|
|
56
|
+
'instruction.cancelled': 'Instruction Cancelled',
|
|
57
|
+
'instruction.failed': 'Instruction Failed',
|
|
58
|
+
'optimistic.applied': 'Optimistic Update',
|
|
59
|
+
'optimistic.rolledBack': 'Optimistic Rollback',
|
|
60
|
+
'scheduler.conflictWait': 'Resource conflict, waiting {waitTime}ms',
|
|
61
|
+
'network.request': 'HTTP Request',
|
|
62
|
+
'network.response': 'HTTP Response',
|
|
63
|
+
'label.instructionInfo': 'Instruction Info:',
|
|
64
|
+
'label.payload': 'Payload:',
|
|
65
|
+
'label.payloadDebugOnly': 'Payload: (use level=DEBUG to see payload)',
|
|
66
|
+
'label.callSourceDetails': 'Call Source Details:',
|
|
67
|
+
'label.backendResult': 'Backend Result:',
|
|
68
|
+
'label.wbExecution': 'WB Execution:',
|
|
69
|
+
'label.rollbackReason': 'Rollback Reason:',
|
|
70
|
+
'label.pipelineStages': 'Pipeline Stages:',
|
|
71
|
+
'label.details': 'Details:',
|
|
72
|
+
'label.suggestions': 'Suggestions:',
|
|
73
|
+
'label.stats': 'Pipeline Stats',
|
|
74
|
+
'label.reason': 'Reason:',
|
|
75
|
+
'label.cancelStage': 'Cancelled At:',
|
|
76
|
+
'label.totalDuration': 'Total:',
|
|
77
|
+
'label.optimisticUpdate': 'Optimistic Update',
|
|
78
|
+
'label.snapshotSaved': 'snapshot saved (for rollback)',
|
|
79
|
+
'stats.total': 'Total:',
|
|
80
|
+
'stats.success': 'Success:',
|
|
81
|
+
'stats.failed': 'Failed:',
|
|
82
|
+
'stats.avgLatency': 'Avg latency:',
|
|
83
|
+
'wb.commitOk': '✅ commit() succeeded',
|
|
84
|
+
'wb.commitFail': '❌ commit() failed',
|
|
85
|
+
'wb.commitArgs': '📝 commit args:',
|
|
86
|
+
'wb.commitError': '🚨 commit error:',
|
|
87
|
+
'wb.commitUnknown': '⚠️ commit() status unknown',
|
|
88
|
+
'wb.noCommit': '⏭️ no commit()',
|
|
89
|
+
'wb.rollbackExecuted': '🔄 optimistic rollback executed',
|
|
90
|
+
'wb.rollbackSnapshot': '📋 rollback snapshot:',
|
|
91
|
+
'wb.rollbackError': '🚨 rollback error:',
|
|
92
|
+
'wb.interruptRegistered': '🎯 registered to interrupt handler (SSE dedup)',
|
|
93
|
+
'common.unknownReason': 'Unknown',
|
|
94
|
+
'suggest.dbLocked': 'Backend database is locked; check write lock/transaction handling.',
|
|
95
|
+
'suggest.network': 'Network error; check whether backend service is running.',
|
|
96
|
+
'suggest.timeout': 'Request timeout; consider increasing timeout or optimizing backend.',
|
|
97
|
+
'suggest.slowInstruction': 'Execution took {duration}ms (> 1000ms); investigate performance.',
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const ZH_CN: Dict = {
|
|
101
|
+
'instruction.created': '指令创建',
|
|
102
|
+
'instruction.success': '指令成功',
|
|
103
|
+
'instruction.cancelled': '指令取消',
|
|
104
|
+
'instruction.failed': '指令失败',
|
|
105
|
+
'optimistic.applied': '乐观更新',
|
|
106
|
+
'optimistic.rolledBack': '乐观回滚',
|
|
107
|
+
'scheduler.conflictWait': '资源冲突,等待 {waitTime}ms',
|
|
108
|
+
'network.request': '网络请求',
|
|
109
|
+
'network.response': '网络响应',
|
|
110
|
+
'label.instructionInfo': '指令信息:',
|
|
111
|
+
'label.payload': '指令参数 (Payload):',
|
|
112
|
+
'label.payloadDebugOnly': '指令参数: (use level=DEBUG to see payload)',
|
|
113
|
+
'label.callSourceDetails': '调用源详情:',
|
|
114
|
+
'label.backendResult': '后端返回 (Result):',
|
|
115
|
+
'label.wbExecution': 'WB阶段执行记录:',
|
|
116
|
+
'label.rollbackReason': '回滚原因:',
|
|
117
|
+
'label.pipelineStages': '流水线阶段:',
|
|
118
|
+
'label.details': '详细信息:',
|
|
119
|
+
'label.suggestions': '建议:',
|
|
120
|
+
'label.stats': '流水线统计',
|
|
121
|
+
'label.reason': '原因:',
|
|
122
|
+
'label.cancelStage': '取消阶段:',
|
|
123
|
+
'label.totalDuration': '总耗时:',
|
|
124
|
+
'label.optimisticUpdate': '乐观更新',
|
|
125
|
+
'label.snapshotSaved': '已保存快照(用于回滚)',
|
|
126
|
+
'stats.total': '总指令数:',
|
|
127
|
+
'stats.success': '成功:',
|
|
128
|
+
'stats.failed': '失败:',
|
|
129
|
+
'stats.avgLatency': '平均延迟:',
|
|
130
|
+
'wb.commitOk': '✅ commit() 函数执行成功',
|
|
131
|
+
'wb.commitFail': '❌ commit() 函数执行失败',
|
|
132
|
+
'wb.commitArgs': '📝 commit 调用参数:',
|
|
133
|
+
'wb.commitError': '🚨 commit 错误:',
|
|
134
|
+
'wb.commitUnknown': '⚠️ commit() 状态未知',
|
|
135
|
+
'wb.noCommit': '⏭️ 无 commit() 函数',
|
|
136
|
+
'wb.rollbackExecuted': '🔄 执行了乐观更新回滚',
|
|
137
|
+
'wb.rollbackSnapshot': '📋 回滚快照:',
|
|
138
|
+
'wb.rollbackError': '🚨 回滚错误:',
|
|
139
|
+
'wb.interruptRegistered': '🎯 已注册到中断处理器 (SSE去重)',
|
|
140
|
+
'common.unknownReason': '未知原因',
|
|
141
|
+
'suggest.dbLocked': '后端数据库锁定,检查写入许可/事务锁是否正确获取',
|
|
142
|
+
'suggest.network': '网络错误,检查后端服务是否运行',
|
|
143
|
+
'suggest.timeout': '请求超时,考虑增加超时时间或优化后端性能',
|
|
144
|
+
'suggest.slowInstruction': '执行耗时 {duration}ms,超过 1 秒,检查是否存在性能问题',
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function format(template: string, params: Record<string, any> | undefined): string {
|
|
148
|
+
if (!params) return template
|
|
149
|
+
return template.replace(/\{(\w+)\}/g, (_, key: string) => String(params[key] ?? `{${key}}`))
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function createCPUConsoleTranslator(locale: CPUConsoleLocale): CPUConsoleTranslate {
|
|
153
|
+
if (locale === 'bilingual') {
|
|
154
|
+
return (key, params) => `${format(ZH_CN[key], params)} / ${format(EN[key], params)}`
|
|
155
|
+
}
|
|
156
|
+
const dict = locale === 'zh-CN' ? ZH_CN : EN
|
|
157
|
+
return (key, params) => format(dict[key], params)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
package/src/logging/index.ts
CHANGED
|
@@ -16,6 +16,8 @@ export { cpuDebugger, CPUDebugger } from './CPUDebugger'
|
|
|
16
16
|
|
|
17
17
|
// 控制台
|
|
18
18
|
export { cpuConsole, CPUConsole } from './CPUConsole'
|
|
19
|
+
export type { CPUConsoleLocale, CPUConsoleTranslate, CPUConsoleI18nKey } from './console-i18n'
|
|
20
|
+
export { createCPUConsoleTranslator } from './console-i18n'
|
|
19
21
|
|
|
20
22
|
// 调用栈解析工具
|
|
21
23
|
export { captureCallSource, formatCallSource, formatCallSourceShort } from './stack-parser'
|