MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / BuildLogger

Class BuildLogger

scripts/logger.js:20–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18};
19
20class BuildLogger {
21 /**
22 * 信息日志 (蓝色)
23 */
24 static log(...args) {
25 console.log(colors.blue + '[INFO]' + colors.reset, ...args);
26 }
27
28 /**
29 * 成功日志 (绿色)
30 */
31 static success(...args) {
32 console.log(colors.green + '[SUCCESS]' + colors.reset, ...args);
33 }
34
35 /**
36 * 警告日志 (黄色)
37 */
38 static warn(...args) {
39 console.warn(colors.yellow + '[WARN]' + colors.reset, ...args);
40 }
41
42 /**
43 * 错误日志 (红色)
44 */
45 static error(...args) {
46 console.error(colors.red + '[ERROR]' + colors.reset, ...args);
47 }
48
49 /**
50 * 调试日志 (灰色)
51 */
52 static debug(...args) {
53 if (process.env.DEBUG || process.env.VERBOSE) {
54 console.log(colors.gray + '[DEBUG]' + colors.reset, ...args);
55 }
56 }
57
58 /**
59 * 标题日志 (粗体青色)
60 */
61 static title(text) {
62 console.log('\n' + colors.bold + colors.cyan + text + colors.reset);
63 console.log(colors.cyan + '='.repeat(text.length) + colors.reset);
64 }
65
66 /**
67 * 进度信息 (无标签)
68 */
69 static progress(...args) {
70 console.log(' ', ...args);
71 }
72
73 /**
74 * 检查项 (带emoji)
75 */
76 static check(passed, message) {
77 const icon = passed ? '✅' : '❌';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected