新增实例槽位隔离与结构化日志,多开不再共用日志与账号

This commit is contained in:
yml2213
2026-10-14 21:32:49 +08:00
parent f96fa7d858
commit 8c4b15066f
27 changed files with 2011 additions and 468 deletions
+58 -7
View File
@@ -116,20 +116,44 @@ export namespace gui {
return a;
}
}
export class LogEntry {
time: string;
level: string;
message: string;
export class InstanceInfo {
name: string;
id: string;
dataDir: string;
logDir: string;
logFile: string;
static createFrom(source: any = {}) {
return new LogEntry(source);
return new InstanceInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.id = source["id"];
this.dataDir = source["dataDir"];
this.logDir = source["logDir"];
this.logFile = source["logFile"];
}
}
export class LogStats {
level: string;
filePath: string;
dir: string;
dropped: number;
count: number;
static createFrom(source: any = {}) {
return new LogStats(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.time = source["time"];
this.level = source["level"];
this.message = source["message"];
this.filePath = source["filePath"];
this.dir = source["dir"];
this.dropped = source["dropped"];
this.count = source["count"];
}
}
export class PrizeListResult {
@@ -530,3 +554,30 @@ export namespace huya {
}
export namespace logger {
export class Entry {
id: number;
time: string;
level: string;
category: string;
account: string;
message: string;
static createFrom(source: any = {}) {
return new Entry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.time = source["time"];
this.level = source["level"];
this.category = source["category"];
this.account = source["account"];
this.message = source["message"];
}
}
}