chore: better log

This commit is contained in:
pk5ls20 committed 2024-11-05 13:52:56 +08:00
1 parent 9b448b17e6
commit 017b8b7f15
5 files changed
+11 -19

No files matched your search

+2 -2
View File
@@ -27,12 +27,12 @@ export class NativePacketClient extends PacketClient {
static compatibilityScore(logger: LogWrapper): number {
const platform = process.platform + '.' + process.arch;
if (!this.supportedPlatforms.includes(platform)) {
logger.logError(`[NativePacketClient] Unsupported platform: ${platform}`);
logger.logError(`[Core] [Packet:Native] 不支持的平台: ${platform}`);
return 0;
}
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/MoeHoo.' + platform + '.node');
if (!fs.existsSync(moehoo_path)) {
logger.logError(`[NativePacketClient] Missing moehoo binary: ${moehoo_path}`);
logger.logError(`[Core] [Packet:Native] 缺失运行时文件: ${moehoo_path}`);
return 0;
}
return 10;