fix: 整理日志、添加颜色、使用统一的日志函数以提高日志可读性

This commit is contained in:
XBB
2024-06-04 02:59:35 +08:00
parent 42c85224ba
commit ab22b775f1
15 changed files with 96 additions and 68 deletions

View File

@@ -2,6 +2,7 @@ import path from 'node:path';
import fs from 'node:fs';
import os from 'node:os';
import { systemPlatform } from '@/common/utils/system';
import { logError } from '@/common/utils/log';
export const exePath = process.execPath;
@@ -49,7 +50,7 @@ if (fs.existsSync(configVersionInfoPath)) {
const _ =JSON.parse(fs.readFileSync(configVersionInfoPath).toString());
_qqVersionConfigInfo = Object.assign(_qqVersionConfigInfo, _);
} catch (e) {
console.error('Load QQ version config info failed, Use default version', e);
logError('Load QQ version config info failed, Use default version', e);
}
}